Methods summary
public
boolean
|
#
connect( boolean $selectdb = true )
connect to the database
Parameters
- $selectdb
boolean select the database now?
Returns
boolean successful?
|
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
string name of the sequence from which to get the next ID
Returns
integer always 0, because mysql has support for autoincrement
|
public
array
|
#
fetchRow( resource $result )
Get a result row as an enumerated array
Get a result row as an enumerated array
Parameters
Returns
array
|
public
array
|
#
fetchArray( $result )
Fetch a result row as an associative array
Fetch a result row as an associative array
Returns
array
|
public
array
|
#
fetchBoth( $result )
Fetch a result row as an associative array
Fetch a result row as an associative array
Returns
array
|
public
integer
|
#
getInsertId( )
Get the ID generated from the previous INSERT operation
Get the ID generated from the previous INSERT operation
Returns
integer
|
public
integer
|
#
getRowsNum( resource $result )
Get number of rows in result
Get number of rows in result
Parameters
- $result
resource query result
Returns
integer
|
public
integer
|
#
getAffectedRows( )
Get number of affected rows
Get number of affected rows
Returns
integer
|
public
|
|
public
boolean
|
#
freeRecordSet( resource $result )
will free all memory associated with the result identifier result.
will free all memory associated with the result identifier result.
Parameters
- $result
resource query result
Returns
boolean TRUE on success or FALSE on failure.
|
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.
|
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.
|
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
string unescaped string text
Returns
string escaped string text with single quotes around
|
public
resource
&
|
#
queryF( string $sql, integer $limit = 0, integer $start = 0 )
perform a query on the database
perform a query on the database
Parameters
- $sql
string a valid MySQL query
- $limit
integer number of records to return
- $start
integer offset of first record to return
Returns
resource query result or FALSE if successful or TRUE if successful and no result
|
public
&
|
#
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
string a valid MySQL query
- $limit
integer number of records to return
- $start
integer offset of first record to return
|
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
string 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
|
public
string
|
#
getFieldName( resource $result, integer $offset )
Get field name
Parameters
- $result
resource query result
- $offset
integer numerical field index
Returns
string
|
public
string
|
#
getFieldType( resource $result, integer $offset )
Get field type
Parameters
- $result
resource query result
- $offset
integer numerical field index
Returns
string
|
public
integer
|
#
getFieldsNum( resource $result )
Get number of fields in result
Get number of fields in result
Parameters
- $result
resource query result
Returns
integer
|
public
|
#
prepare( $query )
Emulates prepare(), but this is TEST API.
Emulates prepare(), but this is TEST API.
Remark
This is TEST API. This method should be called by only Legacy.
|
public
|
#
bind_param( )
Emulates bind_param(), but this is TEST API.
Emulates bind_param(), but this is TEST API.
Remark
This is TEST API. This method should be called by only Legacy.
|
public
&
|
#
execute( )
Executes prepared SQL with query(), but this is TEST API.
Executes prepared SQL with query(), but this is TEST API.
Remark
This is TEST API. This method should be called by only Legacy.
|
public
&
|
#
executeF( )
Executes prepared SQL with queryF(), but this is TEST API.
Executes prepared SQL with queryF(), but this is TEST API.
Remark
This is TEST API. This method should be called by only Legacy.
|