◆ close()
Close MySQL connection
- Returns
- void
◆ connect()
connect |
( |
|
$selectdb = true | ) |
|
connect to the database
- Parameters
-
bool | $selectdb | select the database now? |
- Returns
- bool successful?
◆ errno()
Returns the numerical value of the error message from previous MySQL operation
- Returns
- int Returns the error number from the last MySQL function, or 0 (zero) if no error occurred.
◆ error()
Returns the text of the error message from previous MySQL operation
- Returns
- string Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred.
◆ escape()
Escapes a string for use in a query. Does not add surrounding quotes.
- Parameters
-
string | $string | string to escape |
- Returns
- string
◆ fetchArray()
Fetch a result row as an associative array
- Parameters
-
- Returns
- array|false false on end of data
◆ fetchBoth()
Fetch a result row as an associative array
- Parameters
-
- Returns
- array|false false on end of data
◆ fetchObject()
XoopsMySQLiDatabase::fetchObjected()
- Parameters
-
- Returns
- stdClass|false false on end of data
◆ fetchRow()
Get a result row as an enumerated array
- Parameters
-
- Returns
- array|false false on end of data
◆ freeRecordSet()
will free all memory associated with the result identifier result.
- Parameters
-
mysqli_result | $result | result |
- Returns
- void
◆ genId()
generate an ID for a new row
This is for compatibility only. Will always return 0, because MySQL supports autoincrement for primary keys.
- Parameters
-
string | $sequence | name of the sequence from which to get the next ID |
- Returns
- int always 0, because mysql has support for autoincrement
◆ getAffectedRows()
Get number of affected rows
- Returns
- int
◆ getFieldName()
getFieldName |
( |
|
$result, |
|
|
|
$offset |
|
) |
| |
Get field name
- Parameters
-
mysqli_result | $result | query result |
int | $offset | numerical field index |
- Returns
- string
◆ getFieldsNum()
Get number of fields in result
- Parameters
-
mysqli_result | $result | query result |
- Returns
- int
◆ getFieldType()
getFieldType |
( |
|
$result, |
|
|
|
$offset |
|
) |
| |
Get field type
- Parameters
-
mysqli_result | $result | query result |
int | $offset | numerical field index |
- Returns
- string
◆ getInsertId()
Get the ID generated from the previous INSERT operation
- Returns
- int|string
◆ getRowsNum()
Get number of rows in result
- Parameters
-
- Returns
- int
◆ getServerVersion()
getServerVersion get version of the mysql server
- Returns
- string
◆ isResultSet()
Test the passed result to determine if it is a valid result set
- Parameters
-
mixed | $result | value to test |
- Returns
- bool true if $result is a database result set, otherwise false
Reimplemented from XoopsDatabase.
◆ query()
query |
( |
|
$sql, |
|
|
|
$limit = 0 , |
|
|
|
$start = 0 |
|
) |
| |
|
abstract |
perform a query
This method is empty and does nothing! It should therefore only be used if nothing is exactly what you want done! ;-)
- Parameters
-
string | $sql | a valid MySQL query |
int | $limit | number of records to return |
int | $start | offset of first record to return |
- Returns
- mysqli_result|bool query result or FALSE if successful or TRUE if successful and no result
Reimplemented in XoopsMySQLDatabaseSafe, XoopsMySQLDatabaseProxy, and ProtectorMySQLDatabase.
◆ queryF()
queryF |
( |
|
$sql, |
|
|
|
$limit = 0 , |
|
|
|
$start = 0 |
|
) |
| |
perform a query on the database
- Parameters
-
string | $sql | a valid MySQL query |
int | $limit | number of records to return |
int | $start | offset of first record to return |
- Returns
- mysqli_result|bool query result or FALSE if successful or TRUE if successful and no result
◆ queryFromFile()
perform queries from SQL dump file in a batch
- Parameters
-
string | $file | file path to an SQL dump file |
- Returns
- bool FALSE if failed reading SQL file or TRUE if the file has been read and queries executed
◆ quote()
Quotes a string for use in a query.
- Parameters
-
string | $string | string to quote/escape for use in query |
- Returns
- string
◆ quoteString()
Returns escaped string text with single quotes around it to be safely stored in database
- Parameters
-
string | $str | unescaped string text |
- Returns
- string escaped string text with single quotes around
◆ $conn
The documentation for this class was generated from the following file: