◆ close()
Close MySQL connection
- Renvoie
- void
◆ connect()
connect |
( |
|
$selectdb = true | ) |
|
connect to the database
- Paramètres
-
bool | $selectdb | select the database now? |
- Renvoie
- bool successful?
◆ errno()
Returns the numerical value of the error message from previous MySQL operation
- Renvoie
- 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
- Renvoie
- 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.
- Paramètres
-
string | $string | string to escape |
- Renvoie
- string
◆ fetchArray()
Fetch a result row as an associative array
- Paramètres
-
- Renvoie
- array|false false on end of data
◆ fetchBoth()
Fetch a result row as an associative array
- Paramètres
-
- Renvoie
- array|false false on end of data
◆ fetchObject()
XoopsMySQLiDatabase::fetchObjected()
- Paramètres
-
- Renvoie
- stdClass|false false on end of data
◆ fetchRow()
Get a result row as an enumerated array
- Paramètres
-
- Renvoie
- array|false false on end of data
◆ freeRecordSet()
will free all memory associated with the result identifier result.
- Paramètres
-
mysqli_result | $result | result |
- Renvoie
- 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.
- Paramètres
-
string | $sequence | name of the sequence from which to get the next ID |
- Renvoie
- int always 0, because mysql has support for autoincrement
◆ getAffectedRows()
Get number of affected rows
- Renvoie
- int
◆ getFieldName()
getFieldName |
( |
|
$result, |
|
|
|
$offset |
|
) |
| |
Get field name
- Paramètres
-
mysqli_result | $result | query result |
int | $offset | numerical field index |
- Renvoie
- string
◆ getFieldsNum()
Get number of fields in result
- Paramètres
-
mysqli_result | $result | query result |
- Renvoie
- int
◆ getFieldType()
getFieldType |
( |
|
$result, |
|
|
|
$offset |
|
) |
| |
Get field type
- Paramètres
-
mysqli_result | $result | query result |
int | $offset | numerical field index |
- Renvoie
- string
◆ getInsertId()
Get the ID generated from the previous INSERT operation
- Renvoie
- int
◆ getRowsNum()
Get number of rows in result
- Paramètres
-
- Renvoie
- int
◆ getServerVersion()
getServerVersion get version of the mysql server
- Renvoie
- string
◆ 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! ;-)
- Paramètres
-
string | $sql | a valid MySQL query |
int | $limit | number of records to return |
int | $start | offset of first record to return |
- Renvoie
- mysqli_result|bool query result or FALSE if successful or TRUE if successful and no result
Réimplémentée dans XoopsMySQLDatabaseProxy, XoopsMySQLDatabaseSafe, et ProtectorMySQLDatabase.
◆ queryF()
queryF |
( |
|
$sql, |
|
|
|
$limit = 0 , |
|
|
|
$start = 0 |
|
) |
| |
perform a query on the database
- Paramètres
-
string | $sql | a valid MySQL query |
int | $limit | number of records to return |
int | $start | offset of first record to return |
- Renvoie
- 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
- Paramètres
-
string | $file | file path to an SQL dump file |
- Renvoie
- 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.
- Paramètres
-
string | $string | string to quote/escape for use in query |
- Renvoie
- string
◆ quoteString()
Returns escaped string text with single quotes around it to be safely stored in database
- Paramètres
-
string | $str | unescaped string text |
- Renvoie
- string escaped string text with single quotes around
◆ $conn
La documentation de cette classe a été générée à partir du fichier suivant :