v5:reference:connection:prepare
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
reference:prepare [2015/12/04 17:22] – [Usage] mnewnham | v5:reference:connection:prepare [2016/11/02 12:42] – [prepare] fix broken link for prepareSp dregad | ||
---|---|---|---|
Line 4: | Line 4: | ||
Support for this function is limited. See the feature compatibility matrix | Support for this function is limited. See the feature compatibility matrix | ||
</ | </ | ||
- | <WRAP right box> | + | <WRAP right box 250px> |
+ | == See Also == | ||
+ | [[v5: | ||
+ | [[v5: | ||
== Syntax == | == Syntax == | ||
mixed prepare ( | mixed prepare ( | ||
Line 13: | Line 16: | ||
===== Description ===== | ===== Description ===== | ||
- | The function | + | The method |
+ | * If the database supports prepared statements and the statement is valid the method | ||
+ | * If the database supports prepared statements and the statement is invalid the method | ||
+ | * If the database does not support prepared statements, the method returns a string containing the SQL statement (see below). | ||
------------------------------------- | ------------------------------------- | ||
Line 24: | Line 30: | ||
$handle = $db-> | $handle = $db-> | ||
- | $params | + | $bindVariables |
/* | /* | ||
* Send an array to execute | * Send an array to execute | ||
*/ | */ | ||
- | $result = $db-> | + | $result = $db-> |
</ | </ | ||
For compatibility purposes, if the database does not support prepared statements, the SQL statement is returned into the '' | For compatibility purposes, if the database does not support prepared statements, the SQL statement is returned into the '' | ||
- | |||
v5/reference/connection/prepare.txt · Last modified: 2019/08/09 15:42 by dregad