v5:reference:connection:getinsertsql
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v5:reference:getinsertsql [2016/01/13 02:30] – ↷ Page moved from reference:getinsertsql to v5:reference:getinsertsql mnewnham | v5:reference:connection:getinsertsql [2021/01/25 03:16] (current) – mnewnham | ||
---|---|---|---|
Line 3: | Line 3: | ||
<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. | ||
Line 53: | Line 49: | ||
</ | </ | ||
------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ||
- | <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> | ||
Line 64: | Line 57: | ||
==== $forceType ==== | ==== $forceType ==== | ||
- | see [[reference: | + | see [[v5:reference: |
------------------------------------------- | ------------------------------------------- | ||
===== Usage ===== | ===== Usage ===== |
v5/reference/connection/getinsertsql.txt · Last modified: 2021/01/25 03:16 by mnewnham