Definition at line 28 of file database.php.
Close MySQL connection
- Returns
- void
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::connect |
( |
|
$selectdb = true | ) |
|
|
abstract |
connect to the database
- Parameters
-
bool | $selectdb | select the database now? |
- Returns
- bool successful?
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
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.
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
Returns the text of the error message from previous MySQL operation
- Returns
- bool Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred.
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::escape |
( |
|
$string | ) |
|
|
abstract |
Returns escaped string text without quotes around it
- Parameters
-
string | $string | unescaped string text |
- Returns
- string escaped text string escaped to be safely used in database calls
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::fetchArray |
( |
|
$result | ) |
|
|
abstract |
Fetch a result row as an associative array
- Parameters
-
resource | $result | resource to get result from |
- Returns
- array
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::fetchBoth |
( |
|
$result | ) |
|
|
abstract |
Fetch a result row as an associative array
- Parameters
-
resource | $result | resource to get result from |
- Returns
- array
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::fetchObject |
( |
|
$result | ) |
|
|
abstract |
Fetch a result row as an object
- Parameters
-
resource | $result | resource to get result from |
- Returns
- object|stdClass
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::fetchRow |
( |
|
$result | ) |
|
|
abstract |
Get a result row as an enumerated array
- Parameters
-
resource | $result | resource to get result from |
- Returns
- array
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::freeRecordSet |
( |
|
$result | ) |
|
|
abstract |
Free all memory associated with the result identifier result.
- Parameters
-
resource | $result | query result |
- Returns
- bool TRUE on success or FALSE on failure.
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::genId |
( |
|
$sequence | ) |
|
|
abstract |
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
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::getAffectedRows |
( |
| ) |
|
|
abstract |
Get number of affected rows
- Returns
- int
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::getFieldName |
( |
|
$result, |
|
|
|
$offset |
|
) |
| |
|
abstract |
Get field name
- Parameters
-
resource | $result | query result |
int | $offset | numerical field index |
- Returns
- string
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::getFieldsNum |
( |
|
$result | ) |
|
|
abstract |
Get number of fields in result
- Parameters
-
resource | $result | query result |
- Returns
- int
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::getFieldType |
( |
|
$result, |
|
|
|
$offset |
|
) |
| |
|
abstract |
Get field type
- Parameters
-
resource | $result | query result |
int | $offset | numerical field index |
- Returns
- string
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::getInsertId |
( |
| ) |
|
|
abstract |
Get the ID generated from the previous INSERT operation
- Returns
- int
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::getRowsNum |
( |
|
$result | ) |
|
|
abstract |
Get number of rows in result
- Parameters
-
resource | $result | the resource containing the number of rows |
- Returns
- int the number of rows to return
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::prefix |
( |
|
$tablename = '' | ) |
|
public function prefix($tablename = '')
attach the prefix.'_' to a given tablename if tablename is empty, only prefix will be returned
- Parameters
-
string | $tablename | tablename |
- Returns
- string prefixed tablename, just prefix if tablename is empty
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
Definition at line 76 of file database.php.
References $prefix.
Referenced by XoopsMySQLDatabase\queryFromFile(), and setPrefix().
XoopsDatabase::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
- resource returns nothing
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::queryF |
( |
|
$sql, |
|
|
|
$limit = 0 , |
|
|
|
$start = 0 |
|
) |
| |
|
abstract |
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
- bool|resource query result or FALSE if successful or TRUE if successful and no result
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::queryFromFile |
( |
|
$file | ) |
|
|
abstract |
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
- Deprecated:
- since version 2.6.0 - alpha 3
XoopsDatabase::quote |
( |
|
$string | ) |
|
|
abstract |
Quotes a string for use in a query.
- Parameters
-
string | $string | string to quote |
- Returns
- string
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::quoteString |
( |
|
$str | ) |
|
|
abstract |
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
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
XoopsDatabase::setPrefix |
( |
|
$value | ) |
|
set the prefix for tables in the database
- Parameters
-
- Returns
- this does not return a value
- Deprecated:
- since version 2.6.0 - alpha 3. Switch to doctrine connector.
Definition at line 60 of file database.php.
References prefix().
XoopsDatabase::$allowWebChanges = false |
XoopsDatabase::$prefix = '' |
The documentation for this class was generated from the following file: