Class PdoQuery

Description

A variable of this class is normally constructed through a call to PdoDatabase::Query or PdoDatabase::Prepare, associating it on construction with the database which is to be queried.

Located in /inc/PdoQuery.php (line 395)


	
			
Method Summary
 PdoQuery __construct ( $db)
 void Exec ()
 void Fetch ()
 void FetchAll ()
 void FetchArray ()
 void MaxDuration (double $seconds)
 void Query ()
 void Rows ()
Methods
Constructor __construct (line 406)

Where $db is a PdoDatabase object. This constructs the PdoQuery. If there are further parameters they will be in turn, the sql, and any positional parameters to replace into that, and will be passed to $this->Query() before returning.

PdoQuery __construct ( $db)
  • $db
Exec (line 433)

If there are (some) positional parameters in the prepared query, now is the last chance to supply them...

before the query is executed. Returns true on success and false on error.

void Exec ()
Fetch (line 447)

Will fetch the next row from the query into an object with elements named for the fields in the result.

void Fetch ()
FetchAll (line 464)

Will fetch all result rows from the query into an array of objects with elements named for the fields in the result.

void FetchAll ()
FetchArray (line 456)

Will fetch the next row from the query into an array with numbered elements and with elements named for the fields in the result.

void FetchArray ()
MaxDuration (line 481)

Used to set the maximum duration for this query before it will be logged as a slow query.

void MaxDuration (double $seconds)
  • double $seconds: The maximum duration for this statement before logging it as 'slow'
Query (line 419)

If the sql is supplied then PDO::prepare will be called with that SQL to prepare the query, and if there are positional parameters then they will be replaced into the sql_string (with appropriate escaping) before the call to PDO::prepare. Query preparation time is counted towards total query execution time.

void Query ()
Rows (line 472)

An accessor for the number of rows affected when the query was executed.

void Rows ()

Documentation generated on Fri, 10 Apr 2009 23:45:54 +1200 by phpDocumentor 1.3.2