
Representation of a prepared statement for use with the fDatabase class
1.0.0b7 | Fixed handling of arrays of values for execute(), executeQuery() and executeUnbufferedQuery(), fixed escaping of values that become NULL 5/9/11 |
---|---|
1.0.0b6 | Added getUntranslatedSQL() 1/9/11 |
1.0.0b5 | Fixed an edge case where the mysqli extension would leak memory when fetching a TEXT or BLOB column 8/28/10 |
1.0.0b4 | Updated class to use fCore::startErrorCapture() instead of error_reporting() 8/9/10 |
1.0.0b3 | Backwards Compatibility Break - removed ODBC support. Fixed UTF-8 support for the pdo_dblib extension. 7/31/10 |
1.0.0b2 | Added IBM DB2 support 4/13/10 |
1.0.0b | The initial implementation 3/2/10 |
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Sets up a prepared statement
fStatement __construct( fDatabase $database, string $query, array $placeholders, $untranslated_sql, string $untranslated_query )
fDatabase | $database | The database object this result set was created from |
string | $query | The SQL statement to prepare |
array | $placeholders | The data type placeholders |
string | $untranslated_query | The original untranslated SQL, if applicable |
$untranslated_sql |
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Frees up the result object to save memory
void __destruct( )
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
All requests that hit this method should be requests for callbacks
callback __get( string $method )
string | $method | The method to create a callback for |
The callback for the method requested
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Executes the statement without returning a result
mixed execute( array $params, mixed &$extra, boolean $different )
array | $params | The parameters for the statement |
mixed | &$extra | A variable to place extra information needed by some database extensions |
boolean | $different | If this statement is different than the last statement run on the fDatabase instance |
The (usually boolean) result of the extension function/method call
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Executes the statement in buffered mode
void executeQuery( fResult $result, array $params, mixed &$extra, boolean $different )
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Executes the statement in unbuffered mode (if possible)
void executeUnbufferedQuery( fUnbufferedResult $result, array $params, mixed &$extra, boolean $different )
fUnbufferedResult | $result | The object to place the result into |
array | $params | The parameters for the statement |
mixed | &$extra | A variable to place extra information needed by some database extensions |
boolean | $different | If this statement is different than the last statement run on the fDatabase instance |
Returns the SQL for the prepared statement
string getSQL( )
The SQL statement
Returns the untranslated SQL for the prepared statement
string getUntranslatedSQL( )
The untranslated SQL statement