connect() connect( selectdb = true) : connect to the database Parameters selectdb select the database now? Returns — successful?
genId() genId( sequence) : 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 — always 0, because MySQL has support for autoincrement
fetchRow() fetchRow(\MySQLi_result result) : array|bool Get a result row as an enumerated array Parameters \MySQLi_result result Returns array|bool — false on end of data
fetchArray() fetchArray(\MySQLi_result result) : array|bool Fetch a result row as an associative array Parameters \MySQLi_result result Returns array|bool — false on end of data
fetchBoth() fetchBoth(\MySQLi_result result) : array|bool Fetch a result row as an associative array Parameters \MySQLi_result result Returns array|bool — false on end of data
fetchObject() fetchObject( result) : \stdClass|bool APIMySQLiDatabase::fetchObjected() Parameters result Returns \stdClass|bool — false on end of data
getRowsNum() getRowsNum(\MySQLi_result result) : Get number of rows in result Parameters \MySQLi_result result Returns —
freeRecordSet() freeRecordSet(\MySQLi_result result) : will free all memory associated with the result identifier result. Parameters \MySQLi_result result result Returns —
error() error() : Returns the text of the error message from previous MySQL operation Returns — Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred.
errno() errno() : Returns the numerical value of the error message from previous MySQL operation Returns — Returns the error number from the last MySQL function, or 0 (zero) if no error occurred.
quoteString() quoteString( str) : Returns escaped string text with single quotes around it to be safely stored in database Parameters str unescaped string text Returns — escaped string text with single quotes around
quote() quote( string) : Quotes a string for use in a query. Parameters string string to quote/escape for use in query Returns —
escape() escape( string) : Escapes a string for use in a query. Does not add surrounding quotes. Parameters string string to escape Returns —
queryF() queryF( sql, limit, start) : \MySQLi_result|bool 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 \MySQLi_result|bool — query result or FALSE if successful or TRUE if successful and no result
query() query( sql, limit, start) : perform a query on the database this method allows only SELECT queries for safety. Parameters sql a valid MySQL query limit number of records to return start offset of first record to return Returns — query result or FALSE if unsuccessful
queryFromFile() queryFromFile( file) : perform queries from SQL dump file in a batch Parameters file file path to an SQL dump file Returns — FALSE if failed reading SQL file or TRUE if the file has been read and queries executed
getFieldName() getFieldName(\MySQLi_result result, offset) : Get field name Parameters \MySQLi_result result query result offset numerical field index Returns —
getFieldType() getFieldType(\MySQLi_result result, offset) : Get field type Parameters \MySQLi_result result query result offset numerical field index Returns —
getFieldsNum() getFieldsNum(\MySQLi_result result) : Get number of fields in result Parameters \MySQLi_result result query result Returns —
setLogger() setLogger(\APILogger logger) : assign a {@link APILogger} object to the database Parameters \APILogger logger reference to a {@link APILogger} object Returns
setPrefix() setPrefix( value) : set the prefix for tables in the database Parameters value table prefix Returns
prefix() prefix( tablename) : attach the prefix.'_' to a given tablename if tablename is empty, only prefix will be returned Parameters tablename tablename Returns — prefixed tablename, just prefix if tablename is empty