PHP Interface PMA\libraries\dbi\DBIExtension

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

Méthodes publiques

Méthode Description
affectedRows ( resource $link ) : integer returns the number of rows affected by last query
connect ( string $user, string $password, array $server ) : mixed connects to the database server
dataSeek ( object $result, integer $offset ) : boolean Adjusts the result pointer to an arbitrary row in the result
escapeString ( mixed $link, string $str ) : 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
fetchRow ( object $result ) : array returns array of rows with numeric keys from $result
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
freeResult ( object $result ) : void Frees memory associated with the result
getClientInfo ( ) : string returns a string that represents the client library version
getError ( resource $link ) : string | boolean returns last error message or false if no errors occurred
getFieldsMeta ( object $result ) : array returns metainfo for fields in $result
getHostInfo ( resource $link ) : string Returns a string representing the type of connection used
getProtoInfo ( resource $link ) : integer Returns the version of the MySQL protocol used
moreResults ( resource $link ) : boolean Check if there are any more query results from a multi query
nextResult ( resource $link ) : 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
realMultiQuery ( resource $link, string $query ) : array | boolean Run the multi query and output the results
realQuery ( string $query, resource $link, integer $options ) : mixed runs a query and returns the result
selectDb ( string $dbname, resource $link ) : boolean selects given database
storeResult ( resource $link ) : mixed Store the result returned from multi query

Method Details

affectedRows() public méthode

returns the number of rows affected by last query
public affectedRows ( resource $link ) : integer
$link resource the connection object
Résultat integer

connect() public méthode

connects to the database server
public connect ( string $user, string $password, array $server ) : mixed
$user string user name
$password string user password
$server array 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 ( mixed $link, string $str ) : string
$link mixed database link
$str string string to be escaped
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

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

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

freeResult() public méthode

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

getClientInfo() public méthode

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

getError() public méthode

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

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 ( resource $link ) : string
$link resource mysql link
Résultat string type of connection used

getProtoInfo() public méthode

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

moreResults() public méthode

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

nextResult() public méthode

Prepare next result from multi_query
public nextResult ( resource $link ) : boolean
$link resource 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

realMultiQuery() public méthode

Run the multi query and output the results
public realMultiQuery ( resource $link, string $query ) : array | boolean
$link resource connection object
$query string multi query statement to execute
Résultat array | boolean

realQuery() public méthode

runs a query and returns the result
public realQuery ( string $query, resource $link, integer $options ) : mixed
$query string query to execute
$link resource connection object
$options integer query options
Résultat mixed result

selectDb() public méthode

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

storeResult() public méthode

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