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 275)
string
BuildOptionList
([string $current = ''], [string $location = 'options'], [array $parameters = false])
string
$errorstring
(line 339)
The PostgreSQL error message, if the query fails.
Should be read-only, although any successful Exec should clear it
string
$execution_time
(line 346)
Stores the query execution time - used to deal with long queries.
should be read-only
double
$query_time_warning
= 0.3 (line 355)
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 332)
number of rows from pg_numrows - for fetching result
should be read-only
Constructor __construct (line 365)
Constructor
BuildOptionList (line 613)
Build an option list from the query.
Exec (line 476)
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 523)
Fetch the next row from the query results
FetchBackwards (line 579)
Fetch backwards from the result resource
Plain (line 453)
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 441)
Quote the given string so it can be safely used within string delimiters in a query.
rows (line 427)
Provide a rows() method for forward compatibility with AwlQuery.
SetConnection (line 392)
Use a different database connection for this query
UnFetch (line 568)
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 410)
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 Thu, 15 Apr 2010 20:23:06 +1200 by phpDocumentor 1.3.2