XOOPS
2.6.0
|
Public Member Functions | |
close () | |
connect ($selectdb=true) | |
errno () | |
error () | |
escape ($string) | |
fetchArray ($result) | |
fetchBoth ($result) | |
fetchObject ($result) | |
fetchRow ($result) | |
freeRecordSet ($result) | |
genId ($sequence) | |
getAffectedRows () | |
getFieldName ($result, $offset) | |
getFieldsNum ($result) | |
getFieldType ($result, $offset) | |
getInsertId () | |
getRowsNum ($result) | |
query ($sql, $limit=0, $start=0) | |
queryF ($sql, $limit=0, $start=0) | |
queryFromFile ($file) | |
quote ($string) | |
quoteString ($str) | |
Public Member Functions inherited from XoopsDatabase | |
close () | |
connect ($selectdb=true) | |
errno () | |
error () | |
escape ($string) | |
fetchArray ($result) | |
fetchBoth ($result) | |
fetchObject ($result) | |
fetchRow ($result) | |
freeRecordSet ($result) | |
genId ($sequence) | |
getAffectedRows () | |
getFieldName ($result, $offset) | |
getFieldsNum ($result) | |
getFieldType ($result, $offset) | |
getInsertId () | |
getRowsNum ($result) | |
prefix ($tablename= '') | |
query ($sql, $limit=0, $start=0) | |
queryF ($sql, $limit=0, $start=0) | |
queryFromFile ($file) | |
quote ($string) | |
quoteString ($str) | |
setPrefix ($value) | |
Public Attributes | |
$conn | |
Public Attributes inherited from XoopsDatabase | |
$allowWebChanges = false | |
$conn | |
$prefix = '' | |
Protected Member Functions | |
deprecated () | |
Private Attributes | |
$connect = false | |
$lastResult = null | |
$selectdb | |
Definition at line 30 of file mysqldatabase.php.
XoopsMySQLDatabase::close | ( | ) |
Close MySQL connection
Definition at line 229 of file mysqldatabase.php.
References deprecated().
XoopsMySQLDatabase::connect | ( | $selectdb = true | ) |
connect to the database
bool | $selectdb | select the database now? |
Definition at line 87 of file mysqldatabase.php.
|
protected |
Issue a deprecated warning once per session
Definition at line 64 of file mysqldatabase.php.
References Xoops\getInstance().
Referenced by close(), errno(), error(), escape(), fetchArray(), fetchBoth(), fetchObject(), fetchRow(), freeRecordSet(), genId(), getAffectedRows(), getFieldName(), getFieldsNum(), getFieldType(), getInsertId(), XoopsMySQLDatabaseSafe\query(), XoopsMySQLDatabaseProxy\query(), query(), queryF(), queryFromFile(), quote(), and quoteString().
XoopsMySQLDatabase::errno | ( | ) |
Returns the numerical value of the error message from previous MySQL operation
Definition at line 272 of file mysqldatabase.php.
References deprecated().
XoopsMySQLDatabase::error | ( | ) |
Returns the text of the error message from previous MySQL operation
Definition at line 257 of file mysqldatabase.php.
References deprecated().
XoopsMySQLDatabase::escape | ( | $string | ) |
Escapes a string for use in a query. Does not add quotes.
string | $string | string to escape |
Definition at line 318 of file mysqldatabase.php.
References deprecated(), and quote().
XoopsMySQLDatabase::fetchArray | ( | $result | ) |
Fetch a result row as an associative array
resource | $result | resource to get result from |
Definition at line 138 of file mysqldatabase.php.
References $result, and deprecated().
XoopsMySQLDatabase::fetchBoth | ( | $result | ) |
Fetch a result row as an associative array
resource | $result | resource to get result from |
Definition at line 156 of file mysqldatabase.php.
References $result, and deprecated().
XoopsMySQLDatabase::fetchObject | ( | $result | ) |
Fetch a result row as an object
resource | $result | resource to get result from |
Definition at line 174 of file mysqldatabase.php.
References $result, and deprecated().
XoopsMySQLDatabase::fetchRow | ( | $result | ) |
Get a result row as an enumerated array
resource | $result | resource to get result from |
Definition at line 121 of file mysqldatabase.php.
References $result, and deprecated().
XoopsMySQLDatabase::freeRecordSet | ( | $result | ) |
will free all memory associated with the result identifier result.
resource | $result | query result |
Definition at line 243 of file mysqldatabase.php.
References $result, and deprecated().
XoopsMySQLDatabase::genId | ( | $sequence | ) |
generate an ID for a new row
This is for compatibility only. Will always return 0, because MySQL supports autoincrement for primary keys.
string | $sequence | name of the sequence from which to get the next ID |
Definition at line 107 of file mysqldatabase.php.
References deprecated().
object keep track of last result since we need it for XoopsMySQLDatabase::getAffectedRows | ( | ) |
Get number of affected rows
Definition at line 217 of file mysqldatabase.php.
References deprecated().
XoopsMySQLDatabase::getFieldName | ( | $result, | |
$offset | |||
) |
Get field name
resource | $result | query result |
int | $offset | numerical field index |
Definition at line 424 of file mysqldatabase.php.
References $result, $temp, and deprecated().
XoopsMySQLDatabase::getFieldsNum | ( | $result | ) |
Get number of fields in result
resource | $result | query result |
Definition at line 483 of file mysqldatabase.php.
References $result, and deprecated().
XoopsMySQLDatabase::getFieldType | ( | $result, | |
$offset | |||
) |
Get field type
resource | $result | query result |
int | $offset | numerical field index |
Definition at line 446 of file mysqldatabase.php.
References $result, $temp, and deprecated().
XoopsMySQLDatabase::getInsertId | ( | ) |
Get the ID generated from the previous INSERT operation
Definition at line 190 of file mysqldatabase.php.
References deprecated().
XoopsMySQLDatabase::getRowsNum | ( | $result | ) |
Get number of rows in result
resource | $result | the resource containing the number of rows |
Definition at line 204 of file mysqldatabase.php.
References $result, and Xoops\getInstance().
XoopsMySQLDatabase::query | ( | $sql, | |
$limit = 0 , |
|||
$start = 0 |
|||
) |
perform a query
This method is empty and does nothing! It should therefore only be used if nothing is exactly what you want done! ;-)
string | $sql | a valid MySQL query |
int | $limit | number of records to return |
int | $start | offset of first record to return |
Definition at line 379 of file mysqldatabase.php.
References deprecated().
Referenced by queryFromFile().
XoopsMySQLDatabase::queryF | ( | $sql, | |
$limit = 0 , |
|||
$start = 0 |
|||
) |
perform a query on the database
string | $sql | a valid MySQL query |
int | $limit | number of records to return |
int | $start | offset of first record to return |
Definition at line 337 of file mysqldatabase.php.
References $limit, $result, $sql, $start, deprecated(), and Xoops\Core\Events\getInstance().
Referenced by XoopsMySQLDatabaseSafe\query(), and XoopsMySQLDatabaseProxy\query().
XoopsMySQLDatabase::queryFromFile | ( | $file | ) |
perform queries from SQL dump file in a batch
string | $file | file path to an SQL dump file |
Definition at line 394 of file mysqldatabase.php.
References $file, $query, deprecated(), XoopsDatabase\prefix(), SqlUtility\prefixQuery(), query(), and SqlUtility\splitMySqlFile().
XoopsMySQLDatabase::quote | ( | $string | ) |
Quotes a string for use in a query.
string | $string | string to quote |
Definition at line 303 of file mysqldatabase.php.
References deprecated().
Referenced by escape(), and quoteString().
XoopsMySQLDatabase::quoteString | ( | $str | ) |
Returns escaped string text with single quotes around it to be safely stored in database
string | $str | unescaped string text |
Definition at line 288 of file mysqldatabase.php.
References deprecated(), and quote().
XoopsMySQLDatabase::$conn |
Definition at line 43 of file mysqldatabase.php.
|
private |
Definition at line 50 of file mysqldatabase.php.
Referenced by connect().
|
private |
Definition at line 36 of file mysqldatabase.php.
|
private |
Definition at line 57 of file mysqldatabase.php.
Referenced by connect().