Class Zend_Db_Adapter_Mysqli

Description
  • license: New BSD License
  • copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Db/Adapter/Mysqli.php (line 64)


	
			
Variable Summary
 array $_config
 mixed $_profiler
Method Summary
 void commit ()
 int delete (string $table, string $where)
 array describeTable ( $table)
 array fetchAll (string $sql, [array $bind = null])
 string fetchAssoc (string $sql, [array $bind = null])
 array fetchCol (string $sql, [array $bind = null])
 string fetchOne (string $sql, [array $bind = null])
 string fetchPairs (string $sql, [array $bind = null])
 array fetchRow (string $sql, [array $bind = null])
 int getFetchMode ()
 int insert (string $table, array $bind)
 int lastInsertId ([ $name = null])
 string limit ( $sql,  $count,  $offset)
 array listTables ()
 PDOStatement query (string $sql, [array $bind = array()])
 mixed quote (mixed $value)
 string quoteIdentifier (string $ident)
 mixed quoteInto ( $text,  $value, string $txt, mixed $val)
 void rollBack ()
 void setFetchMode (int $mode)
 int update (string $table, array $bind, string $where)
 void _connect ()
Variables
array $_config = array(
'host' => '127.0.0.1',
'port' => null,
'socket' => null,
'database' => null,
'username' => null,
'password' => null,
)
(line 80)

User-provided configuration.

Basic keys are:

username => (string) Connect to the database as this username. password => (string) Password associated with the username. host => (string) What host to connect to (default 127.0.0.1) dbname => (string) The name of the database to user

Additional keys are processed as key-value pairs for a PDO DSN string.

  • access: protected
int $_fetchMode = Zend_Db::FETCH_ASSOC (line 99)

Fetch mode.

  • access: protected
mixed $_profiler (line 92)

Query profiler.

  • access: protected
Methods
beginTransaction (line 241)

Leave autocommit mode and begin a transaction.

  • access: public
void beginTransaction ()
commit (line 255)

Commit a transaction and return to autocommit mode.

  • access: public
void commit ()
delete (line 338)

Deletes table rows based on a WHERE clause.

  • return: The number of affected rows.
  • access: public
int delete (string $table, string $where)
  • string $table: The table to udpate.
  • string $where: DELETE WHERE clause.
describeTable (line 219)

Returns the column descriptions for a table.

  • access: public
array describeTable ( $table)
  • $table
fetchAll (line 404)

Fetches all SQL result rows as a sequential array.

  • access: public
array fetchAll (string $sql, [array $bind = null])
  • string $sql: An SQL SELECT statement.
  • array $bind: Data to bind into SELECT placeholders.
fetchAssoc (line 426)

Fetches all SQL result rows as an associative array.

The first column is the key, the entire row array is the value.

  • access: public
string fetchAssoc (string $sql, [array $bind = null])
  • string $sql: An SQL SELECT statement.
  • array $bind: Data to bind into SELECT placeholders.
fetchCol (line 448)

Fetches the first column of all SQL result rows as an array.

The first column in each row is used as the array key.

  • access: public
array fetchCol (string $sql, [array $bind = null])
  • string $sql: An SQL SELECT statement.
  • array $bind: Data to bind into SELECT placeholders.
fetchOne (line 489)

Fetches the first column of the first row of the SQL result.

  • access: public
string fetchOne (string $sql, [array $bind = null])
  • string $sql: An SQL SELECT statement.
  • array $bind: Data to bind into SELECT placeholders.
fetchPairs (line 470)

Fetches all SQL result rows as an array of key-value pairs.

The first column is the key, the second column is the value.

  • access: public
string fetchPairs (string $sql, [array $bind = null])
  • string $sql: An SQL SELECT statement.
  • array $bind: Data to bind into SELECT placeholders.
fetchRow (line 505)

Fetches the first row of the SQL result.

  • access: public
array fetchRow (string $sql, [array $bind = null])
  • string $sql: An SQL SELECT statement.
  • array $bind: Data to bind into SELECT placeholders.
getFetchMode (line 391)

Get the fetch mode.

  • access: public
int getFetchMode ()
insert (line 288)

Inserts a table row with specified data.

  • return: The number of affected rows.
  • access: public
int insert (string $table, array $bind)
  • string $table: The table to insert data into.
  • array $bind: Column-value pairs.
lastInsertId (line 196)

Gets the last inserted ID.

  • access: public
int lastInsertId ([ $name = null])
  • $name
limit (line 578)

Adds an adapter-specific LIMIT clause to the SELECT statement.

  • access: public
string limit ( $sql,  $count,  $offset)
  • $sql
  • $count
  • $offset
listTables (line 208)

Returns a list of the tables in the database.

  • access: public
array listTables ()
prepare (line 182)

Returns an SQL statement for preparation.

  • access: public
Zend_Db_Statement_Mysqli prepare (string $sql)
  • string $sql: The SQL statement with placeholders.
query (line 152)

Executes an SQL statement with bound data.

  • access: public
PDOStatement query (string $sql, [array $bind = array()])
  • string $sql: The SQL statement with placeholders.
  • array $bind: An array of data to bind to the placeholders.
quote (line 523)

Safely quotes a value for an SQL statement.

If an array is passed as the value, the array values are quoted and then returned as a comma-separated string.

  • return: An SQL-safe quoted value (or string of separated values).
  • access: public
mixed quote (mixed $value)
  • mixed $value: The value to quote.
quoteIdentifier (line 566)

Quotes an identifier.

  • return: The quoted identifier.
  • access: public
string quoteIdentifier (string $ident)
  • string $ident: The identifier.
quoteInto (line 554)

Quotes a value and places into a piece of text at a placeholder.

The placeholder is a question-mark; all placeholders will be replaced with the quoted value. For example:

  1.  $text "WHERE date < ?";
  2.  $date "2005-01-02";
  3.  $safe $sql->quoteInto($text$date);
  4.  // $safe = "WHERE date < '2005-01-02'"

  • return: An SQL-safe quoted value placed into the orignal text.
  • access: public
mixed quoteInto ( $text,  $value, string $txt, mixed $val)
  • string $txt: The text with a placeholder.
  • mixed $val: The value to quote.
  • $text
  • $value
rollBack (line 271)

Roll back a transaction and return to autocommit mode.

  • access: public
void rollBack ()
select (line 355)

Creates and returns a new Zend_Db_Select object for this adapter.

  • access: public
Zend_Db_Select select ()
setFetchMode (line 370)

Set the fetch mode.

  • access: public
  • todo: Support FETCH_CLASS and FETCH_INTO.
void setFetchMode (int $mode)
  • int $mode: A fetch mode.
update (line 312)

Updates table rows with specified data based on a WHERE clause.

  • return: The number of affected rows.
  • access: public
int update (string $table, array $bind, string $where)
  • string $table: The table to udpate.
  • array $bind: Column-value pairs.
  • string $where: UPDATE WHERE clause.
_connect (line 107)

Creates a connection resource.

  • access: protected
void _connect ()

Documentation generated on Fri, 30 Jun 2006 11:21:10 -0500 by phpDocumentor 1.3.0RC6