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 277)
string
BuildOptionList
([string $current = ''], [string $location = 'options'], [array $parameters = false])
string
$errorstring
(line 341)
The PostgreSQL error message, if the query fails.
Should be read-only, although any successful Exec should clear it
string
$execution_time
(line 348)
Stores the query execution time - used to deal with long queries.
should be read-only
double
$query_time_warning
= 0.3 (line 357)
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 334)
number of rows from pg_numrows - for fetching result
should be read-only
Constructor __construct (line 367)
Constructor
BuildOptionList (line 615)
Build an option list from the query.
Exec (line 478)
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 525)
Fetch the next row from the query results
FetchBackwards (line 581)
Fetch backwards from the result resource
Plain (line 455)
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 443)
Quote the given string so it can be safely used within string delimiters in a query.
rows (line 429)
Provide a rows() method for forward compatibility with AwlQuery.
SetConnection (line 394)
Use a different database connection for this query
UnFetch (line 570)
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 412)
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 Fri, 13 Jan 2012 23:40:17 +1300 by phpDocumentor 1.4.3