Methods summary
public
this
|
#
setPrefix( string $value )
set the prefix for tables in the database
set the prefix for tables in the database
Parameters
Returns
this does not return a value
|
public
string
|
#
prefix( string $tablename = '' )
public function prefix($tablename = '')
public function prefix($tablename = '')
attach the prefix.'_' to a given tablename
if tablename is empty, only prefix will be returned
Parameters
Returns
string prefixed tablename, just prefix if tablename is empty
|
abstract public
boolean
|
#
connect( boolean $selectdb = true )
connect to the database
Parameters
- $selectdb
- select the database now?
Returns
boolean successful?
|
abstract public
integer
|
#
genId( string $sequence )
generate an ID for a new row
generate an ID for a new row
This is for compatibility only. Will always return 0, because MySQL supports
autoincrement for primary keys.
Parameters
- $sequence
- name of the sequence from which to get the next ID
Returns
integer always 0, because mysql has support for autoincrement
|
abstract public
array
|
#
fetchRow( resource $result )
Get a result row as an enumerated array
Get a result row as an enumerated array
Parameters
- $result
- resource to get result from
Returns
array
|
abstract public
array
|
#
fetchArray( resource $result )
Fetch a result row as an associative array
Fetch a result row as an associative array
Parameters
- $result
- resource to get result from
Returns
array
|
abstract public
array
|
#
fetchBoth( resource $result )
Fetch a result row as an associative array
Fetch a result row as an associative array
Parameters
- $result
- resource to get result from
Returns
array
|
abstract public
object|stdClass
|
#
fetchObject( resource $result )
Fetch a result row as an object
Fetch a result row as an object
Parameters
- $result
- resource to get result from
Returns
object|stdClass
|
abstract public
integer
|
#
getInsertId( )
Get the ID generated from the previous INSERT operation
Get the ID generated from the previous INSERT operation
Returns
integer
|
abstract public
integer
|
#
getRowsNum( resource $result )
Get number of rows in result
Get number of rows in result
Parameters
- $result
- the resource containing the number of rows
Returns
integer the number of rows to return
|
abstract public
integer
|
#
getAffectedRows( )
Get number of affected rows
Get number of affected rows
Returns
integer
|
abstract public
|
|
abstract public
boolean
|
#
freeRecordSet( resource $result )
Free all memory associated with the result identifier result.
Free all memory associated with the result identifier result.
Parameters
Returns
boolean TRUE on success or FALSE on failure.
|
abstract public
boolean
|
#
error( )
Returns the text of the error message from previous MySQL operation
Returns the text of the error message from previous MySQL operation
Returns
boolean Returns the error text from the last MySQL function,
or '' (the empty string) if no error occurred.
|
abstract public
integer
|
#
errno( )
Returns the numerical value of the error message from previous
MySQL operation
Returns the numerical value of the error message from previous
MySQL operation
Returns
integer Returns the error number from the last MySQL function
, or 0 (zero) if no error occurred.
|
abstract public
string
|
#
quoteString( string $str )
Returns escaped string text with single
quotes around it to be safely stored in database
Returns escaped string text with single
quotes around it to be safely stored in database
Parameters
- $str
- unescaped string text
Returns
string escaped string text with single quotes around
|
abstract public
string
|
#
quote( string $string )
Quotes a string for use in a query.
Quotes a string for use in a query.
Parameters
Returns
string
|
abstract public
string
|
#
escape( string $string )
Returns escaped string text without quotes around it
Returns escaped string text without quotes around it
Parameters
- $string
- unescaped string text
Returns
string escaped text string escaped to be safely used in database calls
|
abstract public
boolean|resource
|
#
queryF( string $sql, integer $limit = 0, integer $start = 0 )
perform a query on the database
perform a query on the database
Parameters
- $sql
- a valid MySQL query
- $limit
- number of records to return
- $start
- offset of first record to return
Returns
boolean|resource query result or FALSE if successful
or TRUE if successful and no result
|
abstract public
resource
|
#
query( string $sql, integer $limit = 0, integer $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! ;-)
Parameters
- $sql
- a valid MySQL query
- $limit
- number of records to return
- $start
- offset of first record to return
Returns
resource returns nothing
|
abstract public
boolean
|
#
queryFromFile( string $file )
perform queries from SQL dump file in a batch
perform queries from SQL dump file in a batch
Parameters
- $file
- file path to an SQL dump file
Returns
boolean FALSE if failed reading SQL file or TRUE
if the file has been read and queries executed
|
abstract public
string
|
#
getFieldName( resource $result, integer $offset )
Get field name
Parameters
- $result
- query result
- $offset
- numerical field index
Returns
string
|
abstract public
string
|
#
getFieldType( resource $result, integer $offset )
Get field type
Parameters
- $result
- query result
- $offset
- numerical field index
Returns
string
|
abstract public
integer
|
#
getFieldsNum( resource $result )
Get number of fields in result
Get number of fields in result
Parameters
Returns
integer
|