MediaWiki
REL1_19
|
Public Member Functions | |
__construct () | |
query ($sql, $fname= '', $tempIgnore=false) | |
Run an SQL query and return the result. | |
replaceVars ($s) | |
Public Attributes | |
$lastQuery |
Definition at line 3 of file DatabaseSqliteTest.php.
Definition at line 6 of file DatabaseSqliteTest.php.
MockDatabaseSqlite::query | ( | $ | sql, |
$ | fname = '' , |
||
$ | tempIgnore = false |
||
) |
Run an SQL query and return the result.
Normally throws a DBQueryError on failure. If errors are ignored, returns false instead.
In new code, the query wrappers select(), insert(), update(), delete(), etc. should be used where possible, since they give much better DBMS independence and automatically quote or validate user input in a variety of contexts. This function is generally only useful for queries which are explicitly DBMS-dependent and are unsupported by the query wrappers, such as CREATE TABLE.
However, the query wrappers themselves should call this function.
$sql | String: SQL query |
$fname | String: Name of the calling function, for profiling/SHOW PROCESSLIST comment (you can use __METHOD__ or add some extra info) |
$tempIgnore | Boolean: Whether to avoid throwing an exception on errors... maybe best to catch the exception instead? |
DBQueryError | Thrown when the database returns an error of any kind |
Reimplemented from DatabaseBase.
Definition at line 10 of file DatabaseSqliteTest.php.
References DatabaseBase\lastQuery().
$s | string |
Reimplemented from DatabaseSqlite.
Definition at line 15 of file DatabaseSqliteTest.php.
MockDatabaseSqlite::$lastQuery |
Definition at line 4 of file DatabaseSqliteTest.php.