AnewtDatabasePreparedQuery Class Reference

Prepared query class. More...

List of all members.

Public Member Functions

 execute ($values=null)
 Execute the query using the values passed as multiple parameters.
 executev ($values=null)
 Execute the query using the values passed as a single parameter.

Private Member Functions

 __construct ($sql, $connection)
 Construct a new AnewtDatabasePreparedQuery.

Private Attributes

 $connection
 The associated AnewtDatabaseConnection.
 $sql_template
 The associated AnewtDatabaseSQLTemplate.


Detailed Description

Prepared query class.

This class represents a database query (optionally with placeholders) that has not been executed yet.

To obtain an AnewtDatabasePreparedQuery instance, use AnewtDatabaseConnection::prepare(). In many cases the other query methods in AnewtDatabaseConnection suffice, so it is not likely you will be dealing with prepared queries directly.

To execute the prepared query, use either AnewtDatabasePreparedQuery::execute() or AnewtDatabasePreparedQuery::executev(), depending on how you want to pass the parameters to be filled in in the query template. See AnewtDatabaseSQLTemplate for more information.

Definition at line 28 of file prepared-query.lib.php.


Constructor & Destructor Documentation

AnewtDatabasePreparedQuery::__construct ( sql,
connection 
) [private]

Construct a new AnewtDatabasePreparedQuery.

Don't use this method directly: use $connection->prepare() instead.

Parameters:
$sql SQL query template with ?int? style placeholders.
$connection An AnewtDatabaseConnection instance
See also:
AnewtDatabaseConnection

AnewtDatabaseSQLTemplate

Definition at line 60 of file prepared-query.lib.php.


Member Function Documentation

AnewtDatabasePreparedQuery::execute ( values = null  ) 

Execute the query using the values passed as multiple parameters.

Parameters:
$values Zero or more values to be substituted for the placeholders.
Returns:
An AnewtDatabaseResultSet instance.
See also:
AnewtDatabasePreparedQuery::executev

AnewtDatabaseSQLTemplate::fill()

Definition at line 81 of file prepared-query.lib.php.

AnewtDatabasePreparedQuery::executev ( values = null  ) 

Execute the query using the values passed as a single parameter.

Parameters:
$values An array of values to be substituted for the placeholders.
Returns:
An AnewtDatabaseResultSet instance.
See also:
AnewtDatabasePreparedQuery::execute

AnewtDatabaseSQLTemplate::fill()

Definition at line 99 of file prepared-query.lib.php.


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

Generated on Sun Aug 2 22:54:37 2009 for Anewt by  doxygen 1.5.9