PgQueryThe PgQuery Class.
This class builds and executes PostgreSQL Queries and traverses the set of results returned from the query.
Example usage
Located in /PgQuery.php (line 269)
string
BuildOptionList
([string $current = ''], [string $location = 'options'], [array $parameters = false])
string
$errorstring
(line 333)
The PostgreSQL error message, if the query fails.
Should be read-only, although any successful Exec should clear it
string
$execution_time
(line 340)
Stores the query execution time - used to deal with long queries.
should be read-only
double
$query_time_warning
= 0.3 (line 349)
How long the query should take before a warning is issued.
This is writable, but a method to set it might be a better interface. The default is 0.3 seconds.
int
$rows
(line 326)
number of rows from pg_numrows - for fetching result
should be read-only
Constructor PgQuery (line 359)
Constructor
BuildOptionList (line 595)
Build an option list from the query.
Exec (line 464)
Execute the query, logging any debugging.
Example So that you can nicely enable/disable the queries for a particular class, you could use some of PHPs magic constants in your call.
Fetch (line 505)
Fetch the next row from the query results
FetchBackwards (line 561)
Fetch backwards from the result resource
Plain (line 441)
Convert a string which has already been quoted and escaped for PostgreSQL into a magic array so that it will be inserted unmodified into the SQL string. Use with care!
quote (line 429)
Quote the given string so it can be safely used within string delimiters in a query.
SetConnection (line 386)
Use a different database connection for this query
UnFetch (line 550)
Set row counter back one
In the case that you may like to fetch the same row twice, for example if your SQL returns some columns that are the same for each row, and you want to display them cleanly before displaying the other data repeatedly for each row.
Example
_log_error (line 404)
Log error, optionally with file and line location of the caller.
This function should not really be used outside of PgQuery. For a more useful generic logging interface consider calling dbg_error_log(...);
Documentation generated on Tue, 06 Oct 2009 09:31:48 -0700 by phpDocumentor 1.3.2