Dotclear 2.24
Loading...
Searching...
No Matches
mysqliConnection Class Reference

MySQLi Database Driver. More...

Inheritance diagram for mysqliConnection:
dbLayer i_dbLayer mysqlimb4Connection

Public Member Functions

 db_connect (string $host, string $user, string $password, string $database)
 
 db_pconnect (string $host, string $user, string $password, string $database)
 
 db_close ($handle)
 
 db_version ($handle)
 
 db_query ($handle, string $query)
 
 db_exec ($handle, string $query)
 
 db_num_fields ($res)
 
 db_num_rows ($res)
 
 db_field_name ($res, int $position)
 
 db_field_type ($res, int $position)
 
 db_fetch_assoc ($res)
 
 db_result_seek ($res, int $row)
 
 db_changes ($handle, $res)
 
 db_last_error ($handle)
 
 db_escape_string ($str, $handle=null)
 
 db_write_lock (string $table)
 
 db_unlock ()
 
 vacuum (string $table)
 
 dateFormat (string $field, string $pattern)
 
 orderBy (... $args)
 
 lexFields (... $args)
 
 concat (... $args)
 
 escapeSystem (string $str)
 
- Public Member Functions inherited from dbLayer
 __construct (string $host, string $database, string $user='', string $password='', bool $persistent=false)
 
 close ()
 
 driver ()
 
 syntax ()
 
 version ()
 
 database ()
 
 link ()
 
 select (string $sql)
 
 nullRecord ()
 
 execute (string $sql)
 
 begin ()
 
 commit ()
 
 rollback ()
 
 writeLock (string $table)
 
 unlock ()
 
 vacuum (string $table)
 
 changes ()
 
 error ()
 
 dateFormat (string $field, string $pattern)
 
 limit ($arg1, ?int $arg2=null)
 
 in ($in)
 
 orderBy (... $args)
 
 lexFields (... $args)
 
 concat (... $args)
 
 escape ($i)
 
 escapeSystem (string $str)
 
 openCursor (string $table)
 
 db_connect (string $host, string $user, string $password, string $database)
 
 db_pconnect (string $host, string $user, string $password, string $database)
 
 db_close ($handle)
 
 db_version ($handle)
 
 db_query ($handle, string $query)
 
 db_exec ($handle, string $query)
 
 db_num_fields ($res)
 
 db_num_rows ($res)
 
 db_field_name ($res, int $position)
 
 db_field_type ($res, int $position)
 
 db_fetch_assoc ($res)
 
 db_result_seek ($res, int $row)
 
 db_changes ($handle, $res)
 
 db_last_error ($handle)
 
 db_escape_string ($str, $handle=null)
 
 db_write_lock (string $table)
 
 db_unlock ()
 

Static Public Attributes

static $weak_locks = true
 

Protected Member Functions

 _convert_types (string $id)
 

Protected Attributes

 $__driver = 'mysqli'
 
 $__syntax = 'mysql'
 
- Protected Attributes inherited from dbLayer
 $__driver
 
 $__syntax
 
 $__version
 string: Database version More...
 
 $__link
 
 $__last_result
 
 $__database
 

Additional Inherited Members

- Static Public Member Functions inherited from dbLayer
static init (string $driver, string $host, string $database, string $user='', string $password='', bool $persistent=false)
 

Detailed Description

MySQLi Database Driver.

See the dbLayer documentation for common methods.

Member Function Documentation

◆ db_connect()

db_connect ( string  $host,
string  $user,
string  $password,
string  $database 
)

Open a DB connection

Parameters
string$hostThe host
string$userThe user
string$passwordThe password
string$databaseThe database
Exceptions
Exception
Returns
mixed

Reimplemented from i_dbLayer.

Reimplemented in mysqlimb4Connection.

Referenced by db_pconnect().

◆ db_pconnect()

db_pconnect ( string  $host,
string  $user,
string  $password,
string  $database 
)

Open a persistant DB connection

Parameters
string$hostThe host
string$userThe user
string$passwordThe password
string$databaseThe database
Returns
mixed

Reimplemented from i_dbLayer.

Reimplemented in mysqlimb4Connection.

References db_connect().

◆ db_close()

db_close (   $handle)

Close DB connection

Parameters
mixed$handleThe DB handle

Reimplemented from i_dbLayer.

◆ db_version()

db_version (   $handle)

Get DB version

Parameters
mixed$handleThe handle
Returns
string

Reimplemented from i_dbLayer.

◆ db_query()

db_query (   $handle,
string  $query 
)

Execute a DB query

Parameters
mixed$handleThe handle
string$queryThe query
Exceptions
Exception
Returns
mixed

Reimplemented from i_dbLayer.

References db_last_error().

Referenced by db_exec().

◆ db_exec()

db_exec (   $handle,
string  $query 
)

db_query() alias

Parameters
mixed$handleThe handle
string$queryThe query
Returns
mixed

Reimplemented from i_dbLayer.

References db_query().

◆ db_num_fields()

db_num_fields (   $res)

Get number of fields in result

Parameters
mixed$resThe resource
Returns
int

Reimplemented from i_dbLayer.

◆ db_num_rows()

db_num_rows (   $res)

Get number of rows in result

Parameters
mixed$resThe resource
Returns
int

Reimplemented from i_dbLayer.

◆ db_field_name()

db_field_name (   $res,
int  $position 
)

Get field name in result

Parameters
mixed$resThe resource
int$positionThe position
Returns
string

Reimplemented from i_dbLayer.

◆ db_field_type()

db_field_type (   $res,
int  $position 
)

Get field type in result

Parameters
mixed$resThe resource
int$positionThe position
Returns
string

Reimplemented from i_dbLayer.

References _convert_types().

◆ db_fetch_assoc()

db_fetch_assoc (   $res)

Fetch result data

Parameters
mixed$resThe resource
Returns
array|false

Reimplemented from i_dbLayer.

◆ db_result_seek()

db_result_seek (   $res,
int  $row 
)

Seek in result

Parameters
mixed$resThe resource
int$rowThe row
Returns
bool

Reimplemented from i_dbLayer.

◆ db_changes()

db_changes (   $handle,
  $res 
)

Get number of affected rows in last INSERT, DELETE or UPDATE query

Parameters
mixed$handleThe DB handle
mixed$resThe resource
Returns
int

Reimplemented from i_dbLayer.

◆ db_last_error()

db_last_error (   $handle)

Get last query error, if any

Parameters
mixed$handleThe handle
Returns
bool|string

Reimplemented from i_dbLayer.

Referenced by db_query().

◆ db_escape_string()

db_escape_string (   $str,
  $handle = null 
)

Escape a string (to be used in a SQL query)

Parameters
mixed$strThe string
mixed$handleThe DB handle
Returns
string

Reimplemented from i_dbLayer.

◆ db_write_lock()

db_write_lock ( string  $table)

Locks a table

Parameters
string$tableThe table

Reimplemented from i_dbLayer.

References escapeSystem(), and dbLayer\execute().

◆ db_unlock()

db_unlock ( )

Unlock tables

Reimplemented from i_dbLayer.

References dbLayer\execute().

◆ vacuum()

vacuum ( string  $table)

Optimize a table

Parameters
string$tableThe table

Reimplemented from dbLayer.

References escapeSystem(), and dbLayer\execute().

◆ dateFormat()

dateFormat ( string  $field,
string  $pattern 
)

Get a date to be used in SQL query

Parameters
string$fieldThe field
string$patternThe pattern
Returns
string

Reimplemented from dbLayer.

References dbLayer\escape().

◆ orderBy()

orderBy (   $args)

Get an ORDER BY fragment to be used in a SQL query

Parameters
mixed...$args The arguments
Returns
string

Reimplemented from dbLayer.

Reimplemented in mysqlimb4Connection.

◆ lexFields()

lexFields (   $args)

Get fields concerned by lexical sort

Parameters
mixed...$args The arguments
Returns
string

Reimplemented from dbLayer.

Reimplemented in mysqlimb4Connection.

◆ concat()

concat (   $args)

Get a CONCAT fragment

Parameters
mixed...$args The arguments
Returns
string

Reimplemented from dbLayer.

◆ escapeSystem()

escapeSystem ( string  $str)

Escape a string

Parameters
string$strThe string
Returns
string

Reimplemented from dbLayer.

Referenced by db_write_lock(), and vacuum().

◆ _convert_types()

_convert_types ( string  $id)
protected

Get type label

Parameters
string$idThe identifier
Returns
string

Referenced by db_field_type().

Field Documentation

◆ $weak_locks

$weak_locks = true
static

Referenced by dcCore\__construct().

◆ $__driver

$__driver = 'mysqli'
protected

◆ $__syntax

$__syntax = 'mysql'
protected

The documentation for this class was generated from the following file: