Go to the source code of this file.
Functions | |
wfQuery ($sql, $db, $fname= '') | |
Usually aborts on failure If errors are explicitly ignored, returns success. | |
wfSingleQuery ($sql, $dbi, $fname= '') | |
wfIgnoreSQLErrors ($newstate, $dbi=DB_LAST) | |
Turns on (false) or off (true) the automatic generation and sending of a "we're sorry, but there has been a database error" page on database errors. | |
wfFreeResult ($res, $dbi=DB_LAST) | |
#@+ | |
wfFetchObject ($res, $dbi=DB_LAST) | |
Get an object from a database result. | |
wfFetchRow ($res, $dbi=DB_LAST) | |
Get a row from a database result. | |
wfNumRows ($res, $dbi=DB_LAST) | |
Get a number of rows from a database result. | |
wfNumFields ($res, $dbi=DB_LAST) | |
Get the number of fields from a database result. | |
wfFieldName ($res, $n, $dbi=DB_LAST) | |
Return name of a field in a result. | |
wfInsertId ($dbi=DB_LAST) | |
#@- | |
wfDataSeek ($res, $row, $dbi=DB_LAST) | |
wfLastErrno ($dbi=DB_LAST) | |
Get the last error number. | |
wfLastError ($dbi=DB_LAST) | |
Get the last error. | |
wfAffectedRows ($dbi=DB_LAST) | |
Get the number of affected rows. | |
wfLastDBquery ($dbi=DB_LAST) | |
Get the last query ran. | |
wfSetSQL ($table, $var, $value, $cond, $dbi=DB_MASTER) | |
wfGetSQL ($table, $var, $cond='', $dbi=DB_LAST) | |
Simple select wrapper, return one field. | |
wfFieldExists ($table, $field, $dbi=DB_LAST) | |
Does a given field exist on the specified table? | |
wfIndexExists ($table, $index, $dbi=DB_LAST) | |
Does the requested index exist on the specified table? | |
wfInsertArray ($table, $array, $fname= 'wfInsertArray', $dbi=DB_MASTER) | |
wfGetArray ($table, $vars, $conds, $fname= 'wfGetArray', $dbi=DB_LAST) | |
wfUpdateArray ($table, $values, $conds, $fname= 'wfUpdateArray', $dbi=DB_MASTER) | |
wfTableName ($name, $dbi=DB_LAST) | |
Get fully usable table name. | |
wfStrencode ($s, $dbi=DB_LAST) | |
wfNextSequenceValue ($seqName, $dbi=DB_MASTER) | |
wfUseIndexClause ($index, $dbi=DB_SLAVE) |
Definition in file DatabaseFunctions.php.
wfAffectedRows | ( | $ | dbi = DB_LAST |
) |
Get the number of affected rows.
Definition at line 211 of file DatabaseFunctions.php.
wfDataSeek | ( | $ | res, | |
$ | row, | |||
$ | dbi = DB_LAST | |||
) |
Definition at line 172 of file DatabaseFunctions.php.
wfFetchObject | ( | $ | res, | |
$ | dbi = DB_LAST | |||
) |
Get an object from a database result.
Definition at line 89 of file DatabaseFunctions.php.
References $db, $res, and wfGetDB().
Referenced by rebuildRecentChangesTable(), and rebuildRecentChangesTablePass2().
wfFetchRow | ( | $ | res, | |
$ | dbi = DB_LAST | |||
) |
Get a row from a database result.
Definition at line 102 of file DatabaseFunctions.php.
wfFieldExists | ( | $ | table, | |
$ | field, | |||
$ | dbi = DB_LAST | |||
) |
Does a given field exist on the specified table?
$table | ||
$field | ||
$dbi | Default DB_LAST |
Definition at line 279 of file DatabaseFunctions.php.
wfFieldName | ( | $ | res, | |
$ | n, | |||
$ | dbi = DB_LAST | |||
) |
Return name of a field in a result.
$res | Mixed: Ressource link see Database::fieldName() | |
$n | Integer: id of the field | |
$dbi | Default DB_LAST |
Definition at line 144 of file DatabaseFunctions.php.
wfFreeResult | ( | $ | res, | |
$ | dbi = DB_LAST | |||
) |
wfGetArray | ( | $ | table, | |
$ | vars, | |||
$ | conds, | |||
$ | fname = 'wfGetArray' , |
|||
$ | dbi = DB_LAST | |||
) |
wfGetSQL | ( | $ | table, | |
$ | var, | |||
$ | cond = '' , |
|||
$ | dbi = DB_LAST | |||
) |
Simple select wrapper, return one field.
$table | ||
$var | ||
$cond | Default '' | |
$dbi | Default DB_LAST |
Definition at line 261 of file DatabaseFunctions.php.
wfIgnoreSQLErrors | ( | $ | newstate, | |
$ | dbi = DB_LAST | |||
) |
Turns on (false) or off (true) the automatic generation and sending of a "we're sorry, but there has been a database error" page on database errors.
Default is on (false). When turned off, the code should use wfLastErrno() and wfLastError() to handle the situation as appropriate.
$newstate | ||
$dbi |
Definition at line 56 of file DatabaseFunctions.php.
wfIndexExists | ( | $ | table, | |
$ | index, | |||
$ | dbi = DB_LAST | |||
) |
Does the requested index exist on the specified table?
$table | String | |
$index | ||
$dbi | Default DB_LAST |
Definition at line 296 of file DatabaseFunctions.php.
wfInsertArray | ( | $ | table, | |
$ | array, | |||
$ | fname = 'wfInsertArray' , |
|||
$ | dbi = DB_MASTER | |||
) |
$table | String | |
$array | Array | |
$fname | String, default 'wfInsertArray'. | |
$dbi | Default DB_MASTER |
Definition at line 314 of file DatabaseFunctions.php.
wfInsertId | ( | $ | dbi = DB_LAST |
) |
#@-
Definition at line 159 of file DatabaseFunctions.php.
wfLastDBquery | ( | $ | dbi = DB_LAST |
) |
Get the last query ran.
Definition at line 224 of file DatabaseFunctions.php.
wfLastErrno | ( | $ | dbi = DB_LAST |
) |
Get the last error number.
Definition at line 185 of file DatabaseFunctions.php.
wfLastError | ( | $ | dbi = DB_LAST |
) |
Get the last error.
Definition at line 198 of file DatabaseFunctions.php.
wfNextSequenceValue | ( | $ | seqName, | |
$ | dbi = DB_MASTER | |||
) |
Definition at line 392 of file DatabaseFunctions.php.
wfNumFields | ( | $ | res, | |
$ | dbi = DB_LAST | |||
) |
Get the number of fields from a database result.
Definition at line 128 of file DatabaseFunctions.php.
wfNumRows | ( | $ | res, | |
$ | dbi = DB_LAST | |||
) |
Get a number of rows from a database result.
Definition at line 115 of file DatabaseFunctions.php.
References $db, $res, and wfGetDB().
Referenced by rebuildRecentChangesTablePass2().
wfQuery | ( | $ | sql, | |
$ | db, | |||
$ | fname = '' | |||
) |
Usually aborts on failure If errors are explicitly ignored, returns success.
$sql | String: SQL query | |
$db | Mixed: database handler | |
$fname | String: name of the php function calling |
Definition at line 16 of file DatabaseFunctions.php.
References $db, $fname, $sql, wfGetDB(), and wfMsgNoDB().
Referenced by rebuildRecentChangesTable(), and rebuildRecentChangesTablePass2().
wfSetSQL | ( | $ | table, | |
$ | var, | |||
$ | value, | |||
$ | cond, | |||
$ | dbi = DB_MASTER | |||
) |
$table | ||
$var | ||
$value | ||
$cond | ||
$dbi | Default DB_MASTER |
Definition at line 242 of file DatabaseFunctions.php.
wfSingleQuery | ( | $ | sql, | |
$ | dbi, | |||
$ | fname = '' | |||
) |
wfStrencode | ( | $ | s, | |
$ | dbi = DB_LAST | |||
) |
Definition at line 379 of file DatabaseFunctions.php.
References $db, $s, and wfGetDB().
Referenced by rebuildRecentChangesTablePass2().
wfTableName | ( | $ | name, | |
$ | dbi = DB_LAST | |||
) |
Get fully usable table name.
Definition at line 366 of file DatabaseFunctions.php.
wfUpdateArray | ( | $ | table, | |
$ | values, | |||
$ | conds, | |||
$ | fname = 'wfUpdateArray' , |
|||
$ | dbi = DB_MASTER | |||
) |
$table | String | |
$values | ||
$conds | ||
$fname | String, default 'wfUpdateArray' | |
$dbi | Default DB_MASTER |
Definition at line 352 of file DatabaseFunctions.php.
wfUseIndexClause | ( | $ | index, | |
$ | dbi = DB_SLAVE | |||
) |
Definition at line 405 of file DatabaseFunctions.php.