v5:reference:connection:getinsertsql
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| reference:getinsertsql [2015/07/26 00:21] – created mnewnham | v5:reference:connection:getinsertsql [2021/01/25 03:16] (current) – mnewnham | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== getInsertSql ====== | ====== getInsertSql ====== | ||
| + | ~~NOTOC~~ | ||
| <WRAP right box> | <WRAP right box> | ||
| == See Also == | == See Also == | ||
| - | [[reference: | + | [[v5:reference: |
| - | [[reference: | + | [[v5:reference: |
| - | [[reference: | + | [[v5:reference:connection: |
| Line 12: | Line 12: | ||
| mixed $recordSet, | mixed $recordSet, | ||
| string[] $fieldArray, | string[] $fieldArray, | ||
| - | optional bool $dontFixQuotes=false, | + | optional bool $placeholder=false, |
| optional bool $forceType=null | optional bool $forceType=null | ||
| ) | ) | ||
| Line 21: | Line 21: | ||
| ===== Parameters ===== | ===== Parameters ===== | ||
| ==== $recordSet ==== | ==== $recordSet ==== | ||
| - | The parameter '' | + | The parameter '' |
| - | <code php> | + | * a // |
| $SQL = " | $SQL = " | ||
| $result = $db-> | $result = $db-> | ||
| $sql = $db-> | $sql = $db-> | ||
| </ | </ | ||
| - | or | + | |
| - | <code php> | + | * a //string// specifying a table name <code php> |
| $table = ' | $table = ' | ||
| $sql = $db-> | $sql = $db-> | ||
| - | </ | + | </ |
| - | Note that in the second instance, because | + | |
| - | <code php> | + | |
| /* | /* | ||
| * Incorrect syntax | * Incorrect syntax | ||
| */ | */ | ||
| $sql = $db-> | $sql = $db-> | ||
| - | </ | + | </ |
| - | + | ||
| - | Also note that in the second example, | + | |
| ==== $fieldArray ==== | ==== $fieldArray ==== | ||
| '' | '' | ||
| * Any key in the array that does not match a field name in the table will be discarded before the SQL statement is produced. | * Any key in the array that does not match a field name in the table will be discarded before the SQL statement is produced. | ||
| - | * The value of any field in the table that does not appear in the '' | + | * The value of any field in the table that does not appear in the '' |
| * Auto-increment fields should not be included in the field list. | * Auto-increment fields should not be included in the field list. | ||
| <code php> | <code php> | ||
| - | $ar = array(' | + | $ar = array(' |
| </ | </ | ||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ||
| - | <WRAP right tip 300px> | + | ==== $placeHolder |
| - | Use of this parameter is tied to the now removed '' | + | This argument previosly held information about now-deprecated PHP functionality, |
| - | </ | + | |
| - | ==== $dontFixQuotes | + | |
| - | For a description of this behavior see [[reference: | + | |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
| <WRAP right tip 300px> | <WRAP right tip 300px> | ||
| - | This parameter was designed to provide backwards with now unsupported versions of ADOdb and may be removed in future releases. | + | This parameter was designed to provide backwards |
| </ | </ | ||
| ==== $forceType ==== | ==== $forceType ==== | ||
| - | see [[reference: | + | see [[v5:reference: |
| ------------------------------------------- | ------------------------------------------- | ||
| ===== Usage ===== | ===== Usage ===== | ||
v5/reference/connection/getinsertsql.1437862870.txt.gz · Last modified: (external edit)
