PHP Class PMA\libraries\DatabaseInterface

Afficher le fichier Open project: phpmyadmin/phpmyadmin Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( PMA\libraries\dbi\DBIExtension $ext ) Constructor
affectedRows ( object $link = null, boolean $get_from_cache = true ) : integer | boolean returns the number of rows affected by last query
cacheTableContent ( array $contentPath, mixed $value ) : void Set an item in table cache using dot notation.
checkDbExtension ( string $extension = 'mysql' ) : boolean Checks whether database extension is loaded
clearTableCache ( ) : void Clear the table cache.
connect ( integer $mode, array $server = null ) : mixed connects to the database server
dataSeek ( object $result, integer $offset ) : boolean Adjusts the result pointer to an arbitrary row in the result
escapeString ( string $str, mixed $link = null ) : string returns properly escaped string for use in MySQL queries
fetchArray ( object $result ) : array returns array of rows with associative and numeric keys from $result
fetchAssoc ( object $result ) : array returns array of rows with associative keys from $result
fetchResult ( string $query, string | integer | array $key = null, string | integer $value = null, object $link = null, integer $options ) : array returns all rows in the resultset in one array
fetchRow ( object $result ) : array returns array of rows with numeric keys from $result
fetchSingleRow ( string $query, string $type = 'ASSOC', object $link = null ) : array | boolean returns only the first row from the result
fetchValue ( string $query, integer $row_number, integer | string $field, object $link = null ) : mixed returns a single value from the given result or query, if the query or the result has more than one row or field the first field of the first row is returned
fieldFlags ( object $result, integer $i ) : string returns concatenated string of human readable field flags
fieldLen ( object $result, integer $i ) : integer returns the length of the given field $i in $result
fieldName ( object $result, integer $i ) : string returns name of $i. field in $result
formatError ( integer $error_number, string $error_message ) : string Formats database error message in a friendly way.
freeResult ( object $result ) : void Frees memory associated with the result
getCachedTableContent ( array $contentPath, mixed $default = null ) : mixed Get a cached value from table cache.
getClientInfo ( ) : string returns a string that represents the client library version
getColumnMapFromSql ( string $sql_query, array $view_columns = [] ) : array returns detailed array with all columns for sql
getColumnNames ( string $database, string $table, mixed $link = null ) : null | array Returns all column names in given table
getColumns ( string $database, string $table, string $column = null, boolean $full = false, mixed $link = null ) : array Returns descriptions of columns in given table (all or given by $column)
getColumnsFull ( string $database = null, string $table = null, string $column = null, mixed $link = null ) : array returns detailed array with all columns for given table in database, or all tables/databases
getColumnsSql ( string $database, string $table, string $column = null, boolean $full = false ) : string Returns SQL query for fetching columns for a table
getCompatibilities ( ) : array Get supported SQL compatibility modes
getConnectionParams ( integer $mode, array $server = null ) : array Return connection parameters for the database server
getCurrentUser ( ) : string gets the current user with host
getCurrentUserAndHost ( ) : array Get the current user and host
getDatabasesFull ( string $database = null, boolean $force_stats = false, object $link = null, string $sort_by = 'SCHEMA_NAME', string $sort_order = 'ASC', integer $limit_offset, boolean | integer $limit_count = false ) : array returns array with databases containing extended infos about them
getDbCollation ( string $db ) : string returns collation of given db
getDefinition ( string $db, string $which, string $name, object $link = null ) : string returns the definition of a specific PROCEDURE, FUNCTION, EVENT or VIEW
getError ( object $link = null ) : string | boolean returns last error message or false if no errors occurred
getEvents ( string $db, string $name = '' ) : array returns details about the EVENTs for a specific database
getFieldsMeta ( object $result ) : array returns metainfo for fields in $result
getHostInfo ( object $link = null ) : string Returns a string representing the type of connection used
getKillQuery ( integer $process ) : string Gets SQL for killing a process.
getLink ( $link = null ) * Gets correct link object.
getProceduresOrFunctions ( string $db, string $which, object $link = null ) : array returns an array of PROCEDURE or FUNCTION names for a db
getProtoInfo ( object $link = null ) : integer Returns the version of the MySQL protocol used
getRoutines ( string $db, string $which = null, string $name = '' ) : array returns details about the PROCEDUREs or FUNCTIONs for a specific database or details about a specific routine
getServerCollation ( ) : string returns default server collation from show variables
getSystemDatabase ( ) : SystemDatabase Get the phpmyadmin database manager
getSystemSchemas ( ) : array Get the list of system schemas
getTable ( string $db_name, string $table_name ) : Table Get a table with database name and table name
getTableIndexes ( string $database, string $table, mixed $link = null ) : array Returns indexes of a table
getTableIndexesSql ( string $database, string $table, string $where = null ) : string Returns SQL for fetching information on table indexes (SHOW INDEXES)
getTables ( string $database, mixed $link = null ) : array returns array with table names for given db
getTablesFull ( string $database, string | array $table = '', boolean $tbl_is_group = false, mixed $link = null, integer $limit_offset, boolean | integer $limit_count = false, string $sort_by = 'Name', string $sort_order = 'ASC', string $table_type = null ) : array returns array of all tables in given db or dbs this function expects unquoted names: RIGHT: my_database WRONG: my_database WRONG: my\_database if $tbl_is_group is true, $table is used as filter for table names
getTriggers ( string $db, string $table = '', string $delimiter = '//' ) : array returns details about the TRIGGERs for a specific table or database
getVariable ( string $var, integer $type = self::GETVAR_SESSION, mixed $link = null ) : mixed returns value of given mysql server variable
getVirtualTables ( string $db ) : array Get VIEWs in a particular database
getWarnings ( object $link = null ) : array returns warnings for last query
insertId ( object $link = null ) : integer | boolean returns last inserted auto_increment id for given $link or $GLOBALS['userlink']
isAmazonRds ( ) : boolean Checks if this database server is running on Amazon RDS.
isSuperuser ( ) : boolean Checks if current user is superuser
isSystemSchema ( string $schema_name, boolean $testForMysqlSchema = false ) : boolean Checks whether given schema is a system schema
isUserType ( string $type ) : boolean Checks if current user has global create user/grant privilege or is a superuser (i.e. SELECT on mysql.users) while caching the result in session.
moreResults ( object $link = null ) : boolean Check if there are any more query results from a multi query
nextResult ( object $link = null ) : boolean Prepare next result from multi_query
numFields ( object $result ) : integer return number of fields in given $result
numRows ( object $result ) : string | integer returns the number of rows returned by last query
postConnect ( mixed $link ) : void Function called just after a connection to the MySQL database server has been established. It sets the connection collation, and determines the version of MySQL which is running.
query ( string $query, mixed $link = null, integer $options, boolean $cache_affected_rows = true ) : mixed runs a query
selectDb ( string $dbname, object $link = null ) : boolean selects given database
setVariable ( string $var, string $value, mixed $link = null ) : boolean Sets new value for a variable if it is different from the current value
storeResult ( object $link = null ) : mixed Store the result returned from multi query
tryMultiQuery ( string $multi_query = '', mysqli $link = null ) : mysqli_result Run multi query statement and return results
tryQuery ( string $query, object $link = null, integer $options, boolean $cache_affected_rows = true ) : mixed runs a query and returns the result

Private Methods

Méthode Description
_cacheTableData ( array $tables, string $table ) : void Caches table data so Table does not require to issue SHOW TABLE STATUS again
_dbgQuery ( string $query, object $link, object | boolean $result, integer $time ) : void Stores query data into session data for debugging purposes
_fetchValue ( array $row, string | null $value ) : mixed Returns row or element of a row
_getSqlForTablesFull ( string[] $this_databases, string $sql_where_table ) : string returns the beginning of the SQL statement to fetch the list of tables
_getTableCondition ( array | string $table, boolean $tbl_is_group, string $table_type ) : string returns a segment of the SQL WHERE clause regarding table name and type
_usortComparisonCallback ( string $a, string $b ) : integer usort comparison callback

Method Details

__construct() public méthode

Constructor
public __construct ( PMA\libraries\dbi\DBIExtension $ext )
$ext PMA\libraries\dbi\DBIExtension Object to be used for database queries

affectedRows() public méthode

returns the number of rows affected by last query
public affectedRows ( object $link = null, boolean $get_from_cache = true ) : integer | boolean
$link object the connection object
$get_from_cache boolean whether to retrieve from cache
Résultat integer | boolean

cacheTableContent() public méthode

Set an item in table cache using dot notation.
public cacheTableContent ( array $contentPath, mixed $value ) : void
$contentPath array Array with the target path
$value mixed Target value
Résultat void

checkDbExtension() public static méthode

Checks whether database extension is loaded
public static checkDbExtension ( string $extension = 'mysql' ) : boolean
$extension string mysql extension to check
Résultat boolean

clearTableCache() public méthode

Clear the table cache.
public clearTableCache ( ) : void
Résultat void

connect() public méthode

connects to the database server
public connect ( integer $mode, array $server = null ) : mixed
$mode integer Connection mode on of CONNECT_USER, CONNECT_CONTROL or CONNECT_AUXILIARY.
$server array Server information like host/port/socket/persistent
Résultat mixed false on error or a connection object on success

dataSeek() public méthode

Adjusts the result pointer to an arbitrary row in the result
public dataSeek ( object $result, integer $offset ) : boolean
$result object database result
$offset integer offset to seek
Résultat boolean true on success, false on failure

escapeString() public méthode

returns properly escaped string for use in MySQL queries
public escapeString ( string $str, mixed $link = null ) : string
$str string string to be escaped
$link mixed optional database link to use
Résultat string a MySQL escaped string

fetchArray() public méthode

returns array of rows with associative and numeric keys from $result
public fetchArray ( object $result ) : array
$result object result set identifier
Résultat array

fetchAssoc() public méthode

returns array of rows with associative keys from $result
public fetchAssoc ( object $result ) : array
$result object result set identifier
Résultat array

fetchResult() public méthode

$sql = 'SELECT * FROM user'; $users = $GLOBALS['dbi']->fetchResult($sql); produces $users[] = array('id' => 123, 'name' => 'John Doe') $sql = 'SELECT id, name FROM user'; $users = $GLOBALS['dbi']->fetchResult($sql, 'id'); produces $users['123'] = array('id' => 123, 'name' => 'John Doe') $sql = 'SELECT id, name FROM user'; $users = $GLOBALS['dbi']->fetchResult($sql, 0); produces $users['123'] = array(0 => 123, 1 => 'John Doe') $sql = 'SELECT id, name FROM user'; $users = $GLOBALS['dbi']->fetchResult($sql, 'id', 'name'); or $users = $GLOBALS['dbi']->fetchResult($sql, 0, 1); produces $users['123'] = 'John Doe' $sql = 'SELECT name FROM user'; $users = $GLOBALS['dbi']->fetchResult($sql); produces $users[] = 'John Doe' $sql = 'SELECT group, name FROM user' $users = $GLOBALS['dbi']->fetchResult($sql, array('group', null), 'name'); produces $users['admin'][] = 'John Doe' $sql = 'SELECT group, name FROM user' $users = $GLOBALS['dbi']->fetchResult($sql, array('group', 'name'), 'id'); produces $users['admin']['John Doe'] = '123'
public fetchResult ( string $query, string | integer | array $key = null, string | integer $value = null, object $link = null, integer $options ) : array
$query string query to execute
$key string | integer | array field-name or offset used as key for array or array of those
$value string | integer value-name or offset used as value for array
$link object mysql link
$options integer query options
Résultat array resultrows or values indexed by $key

fetchRow() public méthode

returns array of rows with numeric keys from $result
public fetchRow ( object $result ) : array
$result object result set identifier
Résultat array

fetchSingleRow() public méthode

$sql = 'SELECT * FROM user WHERE id = 123'; $user = $GLOBALS['dbi']->fetchSingleRow($sql); produces $user = array('id' => 123, 'name' => 'John Doe')
public fetchSingleRow ( string $query, string $type = 'ASSOC', object $link = null ) : array | boolean
$query string The query to execute
$type string NUM|ASSOC|BOTH returned array should either numeric associative or both
$link object mysql link
Résultat array | boolean first row from result or false if result is empty

fetchValue() public méthode

$sql = 'SELECT name FROM user WHERE id = 123'; $user_name = $GLOBALS['dbi']->fetchValue($sql); produces $user_name = 'John Doe'
public fetchValue ( string $query, integer $row_number, integer | string $field, object $link = null ) : mixed
$query string The query to execute
$row_number integer row to fetch the value from, starting at 0, with 0 being default
$field integer | string field to fetch the value from, starting at 0, with 0 being default
$link object mysql link
Résultat mixed value of first field in first row from result or false if not found

fieldFlags() public méthode

returns concatenated string of human readable field flags
public fieldFlags ( object $result, integer $i ) : string
$result object result set identifier
$i integer field
Résultat string field flags

fieldLen() public méthode

returns the length of the given field $i in $result
public fieldLen ( object $result, integer $i ) : integer
$result object result set identifier
$i integer field
Résultat integer length of field

fieldName() public méthode

returns name of $i. field in $result
public fieldName ( object $result, integer $i ) : string
$result object result set identifier
$i integer field
Résultat string name of $i. field in $result

formatError() public méthode

This is needed because some errors messages cannot be obtained by mysql_error().
public formatError ( integer $error_number, string $error_message ) : string
$error_number integer Error code
$error_message string Error message as returned by server
Résultat string HML text with error details

freeResult() public méthode

Frees memory associated with the result
public freeResult ( object $result ) : void
$result object database result
Résultat void

getCachedTableContent() public méthode

Get a cached value from table cache.
public getCachedTableContent ( array $contentPath, mixed $default = null ) : mixed
$contentPath array Array of the name of the target value
$default mixed Return value on cache miss
Résultat mixed cached value or default

getClientInfo() public méthode

returns a string that represents the client library version
public getClientInfo ( ) : string
Résultat string MySQL client library version

getColumnMapFromSql() public méthode

returns detailed array with all columns for sql
public getColumnMapFromSql ( string $sql_query, array $view_columns = [] ) : array
$sql_query string target SQL query to get columns
$view_columns array alias for columns
Résultat array

getColumnNames() public méthode

Returns all column names in given table
public getColumnNames ( string $database, string $table, mixed $link = null ) : null | array
$database string name of database
$table string name of table to retrieve columns from
$link mixed mysql link resource
Résultat null | array

getColumns() public méthode

Returns descriptions of columns in given table (all or given by $column)
public getColumns ( string $database, string $table, string $column = null, boolean $full = false, mixed $link = null ) : array
$database string name of database
$table string name of table to retrieve columns from
$column string name of column, null to show all columns
$full boolean whether to return full info or only column names
$link mixed mysql link resource
Résultat array array indexed by column names or, if $column is given, flat array description

getColumnsFull() public méthode

returns detailed array with all columns for given table in database, or all tables/databases
public getColumnsFull ( string $database = null, string $table = null, string $column = null, mixed $link = null ) : array
$database string name of database
$table string name of table to retrieve columns from
$column string name of specific column
$link mixed mysql link resource
Résultat array

getColumnsSql() public méthode

The 'Key' column is not calculated properly, use $GLOBALS['dbi']->getColumns() to get correct values.
See also: getColumns()
public getColumnsSql ( string $database, string $table, string $column = null, boolean $full = false ) : string
$database string name of database
$table string name of table to retrieve columns from
$column string name of column, null to show all columns
$full boolean whether to return full info or only column names
Résultat string

getCompatibilities() public méthode

Get supported SQL compatibility modes
public getCompatibilities ( ) : array
Résultat array supported SQL compatibility modes

getConnectionParams() public méthode

Return connection parameters for the database server
public getConnectionParams ( integer $mode, array $server = null ) : array
$mode integer Connection mode on of CONNECT_USER, CONNECT_CONTROL or CONNECT_AUXILIARY.
$server array Server information like host/port/socket/persistent
Résultat array user, host and server settings array

getCurrentUser() public méthode

gets the current user with host
public getCurrentUser ( ) : string
Résultat string the current user i.e. user@host

getCurrentUserAndHost() public méthode

Get the current user and host
public getCurrentUserAndHost ( ) : array
Résultat array array of username and hostname

getDatabasesFull() public méthode

returns array with databases containing extended infos about them
public getDatabasesFull ( string $database = null, boolean $force_stats = false, object $link = null, string $sort_by = 'SCHEMA_NAME', string $sort_order = 'ASC', integer $limit_offset, boolean | integer $limit_count = false ) : array
$database string database
$force_stats boolean retrieve stats also for MySQL < 5
$link object mysql link
$sort_by string column to order by
$sort_order string ASC or DESC
$limit_offset integer starting offset for LIMIT
$limit_count boolean | integer row count for LIMIT or true for $GLOBALS['cfg']['MaxDbList']
Résultat array $databases

getDbCollation() public méthode

returns collation of given db
public getDbCollation ( string $db ) : string
$db string name of db
Résultat string collation of $db

getDefinition() public méthode

returns the definition of a specific PROCEDURE, FUNCTION, EVENT or VIEW
public getDefinition ( string $db, string $which, string $name, object $link = null ) : string
$db string db name
$which string PROCEDURE | FUNCTION | EVENT | VIEW
$name string the procedure|function|event|view name
$link object MySQL link
Résultat string the definition

getError() public méthode

returns last error message or false if no errors occurred
public getError ( object $link = null ) : string | boolean
$link object connection link
Résultat string | boolean $error or false

getEvents() public méthode

returns details about the EVENTs for a specific database
public getEvents ( string $db, string $name = '' ) : array
$db string db name
$name string event name
Résultat array information about EVENTs

getFieldsMeta() public méthode

returns metainfo for fields in $result
public getFieldsMeta ( object $result ) : array
$result object result set identifier
Résultat array meta info for fields in $result

getHostInfo() public méthode

Returns a string representing the type of connection used
public getHostInfo ( object $link = null ) : string
$link object mysql link
Résultat string type of connection used

getKillQuery() public méthode

Gets SQL for killing a process.
public getKillQuery ( integer $process ) : string
$process integer Process ID
Résultat string

getProceduresOrFunctions() public méthode

returns an array of PROCEDURE or FUNCTION names for a db
public getProceduresOrFunctions ( string $db, string $which, object $link = null ) : array
$db string db name
$which string PROCEDURE | FUNCTION
$link object mysql link
Résultat array the procedure names or function names

getProtoInfo() public méthode

Returns the version of the MySQL protocol used
public getProtoInfo ( object $link = null ) : integer
$link object mysql link
Résultat integer version of the MySQL protocol used

getRoutines() public méthode

returns details about the PROCEDUREs or FUNCTIONs for a specific database or details about a specific routine
public getRoutines ( string $db, string $which = null, string $name = '' ) : array
$db string db name
$which string PROCEDURE | FUNCTION or null for both
$name string name of the routine (to fetch a specific routine)
Résultat array information about ROCEDUREs or FUNCTIONs

getServerCollation() public méthode

returns default server collation from show variables
public getServerCollation ( ) : string
Résultat string $server_collation

getSystemDatabase() public méthode

Get the phpmyadmin database manager
public getSystemDatabase ( ) : SystemDatabase
Résultat SystemDatabase

getSystemSchemas() public méthode

Get the list of system schemas
public getSystemSchemas ( ) : array
Résultat array list of system schemas

getTable() public méthode

Get a table with database name and table name
public getTable ( string $db_name, string $table_name ) : Table
$db_name string DB name
$table_name string Table name
Résultat Table

getTableIndexes() public méthode

Returns indexes of a table
public getTableIndexes ( string $database, string $table, mixed $link = null ) : array
$database string name of database
$table string name of the table whose indexes are to be retrieved
$link mixed mysql link resource
Résultat array $indexes

getTableIndexesSql() public méthode

Returns SQL for fetching information on table indexes (SHOW INDEXES)
public getTableIndexesSql ( string $database, string $table, string $where = null ) : string
$database string name of database
$table string name of the table whose indexes are to be retrieved
$where string additional conditions for WHERE
Résultat string SQL for getting indexes

getTables() public méthode

returns array with table names for given db
public getTables ( string $database, mixed $link = null ) : array
$database string name of database
$link mixed mysql link resource|object
Résultat array tables names

getTablesFull() public méthode

$GLOBALS['dbi']->getTablesFull('my_database'); $GLOBALS['dbi']->getTablesFull('my_database', 'my_table')); $GLOBALS['dbi']->getTablesFull('my_database', 'my_tables_', true));
public getTablesFull ( string $database, string | array $table = '', boolean $tbl_is_group = false, mixed $link = null, integer $limit_offset, boolean | integer $limit_count = false, string $sort_by = 'Name', string $sort_order = 'ASC', string $table_type = null ) : array
$database string database
$table string | array table name(s)
$tbl_is_group boolean $table is a table group
$link mixed mysql link
$limit_offset integer zero-based offset for the count
$limit_count boolean | integer number of tables to return
$sort_by string table attribute to sort by
$sort_order string direction to sort (ASC or DESC)
$table_type string whether table or view
Résultat array list of tables in given db(s)

getTriggers() public méthode

returns details about the TRIGGERs for a specific table or database
public getTriggers ( string $db, string $table = '', string $delimiter = '//' ) : array
$db string db name
$table string table name
$delimiter string the delimiter to use (may be empty)
Résultat array information about triggers (may be empty)

getVariable() public méthode

returns value of given mysql server variable
public getVariable ( string $var, integer $type = self::GETVAR_SESSION, mixed $link = null ) : mixed
$var string mysql server variable name
$type integer DatabaseInterface::GETVAR_SESSION | DatabaseInterface::GETVAR_GLOBAL
$link mixed mysql link resource|object
Résultat mixed value for mysql server variable

getVirtualTables() public méthode

Get VIEWs in a particular database
public getVirtualTables ( string $db ) : array
$db string Database name to look in
Résultat array $views Set of VIEWs inside the database

getWarnings() public méthode

returns warnings for last query
public getWarnings ( object $link = null ) : array
$link object mysql link resource
Résultat array warnings

insertId() public méthode

returns last inserted auto_increment id for given $link or $GLOBALS['userlink']
public insertId ( object $link = null ) : integer | boolean
$link object the connection object
Résultat integer | boolean

isAmazonRds() public méthode

Checks if this database server is running on Amazon RDS.
public isAmazonRds ( ) : boolean
Résultat boolean

isSuperuser() public méthode

Checks if current user is superuser
public isSuperuser ( ) : boolean
Résultat boolean Whether user is a superuser

isSystemSchema() public méthode

Checks whether given schema is a system schema
public isSystemSchema ( string $schema_name, boolean $testForMysqlSchema = false ) : boolean
$schema_name string Name of schema (database) to test
$testForMysqlSchema boolean Whether 'mysql' schema should be treated the same as IS and DD
Résultat boolean

isUserType() public méthode

Checks if current user has global create user/grant privilege or is a superuser (i.e. SELECT on mysql.users) while caching the result in session.
public isUserType ( string $type ) : boolean
$type string type of user to check for i.e. 'create', 'grant', 'super'
Résultat boolean Whether user is a given type of user

moreResults() public méthode

Check if there are any more query results from a multi query
public moreResults ( object $link = null ) : boolean
$link object the connection object
Résultat boolean true or false

nextResult() public méthode

Prepare next result from multi_query
public nextResult ( object $link = null ) : boolean
$link object the connection object
Résultat boolean true or false

numFields() public méthode

return number of fields in given $result
public numFields ( object $result ) : integer
$result object result set identifier
Résultat integer field count

numRows() public méthode

returns the number of rows returned by last query
public numRows ( object $result ) : string | integer
$result object result set identifier
Résultat string | integer

postConnect() public méthode

Function called just after a connection to the MySQL database server has been established. It sets the connection collation, and determines the version of MySQL which is running.
public postConnect ( mixed $link ) : void
$link mixed mysql link resource|object
Résultat void

query() public méthode

runs a query
public query ( string $query, mixed $link = null, integer $options, boolean $cache_affected_rows = true ) : mixed
$query string SQL query to execute
$link mixed optional database link to use
$options integer optional query options
$cache_affected_rows boolean whether to cache affected rows
Résultat mixed

selectDb() public méthode

selects given database
public selectDb ( string $dbname, object $link = null ) : boolean
$dbname string database name to select
$link object connection object
Résultat boolean

setVariable() public méthode

Sets new value for a variable if it is different from the current value
public setVariable ( string $var, string $value, mixed $link = null ) : boolean
$var string variable name
$value string value to set
$link mixed mysql link resource|object
Résultat boolean whether query was a successful

storeResult() public méthode

Store the result returned from multi query
public storeResult ( object $link = null ) : mixed
$link object the connection object
Résultat mixed false when empty results / result set when not empty

tryMultiQuery() public méthode

Run multi query statement and return results
public tryMultiQuery ( string $multi_query = '', mysqli $link = null ) : mysqli_result
$multi_query string multi query statement to execute
$link mysqli mysqli object
Résultat mysqli_result collection | boolean(false)

tryQuery() public méthode

runs a query and returns the result
public tryQuery ( string $query, object $link = null, integer $options, boolean $cache_affected_rows = true ) : mixed
$query string query to run
$link object mysql link resource
$options integer query options
$cache_affected_rows boolean whether to cache affected row
Résultat mixed