php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #24649 The pg_query doc page has an error
Submitted: 2003-07-14 14:07 UTC Modified: 2003-07-14 14:47 UTC
From: ler at lerctr dot org Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.2 OS: Web
Private report: No CVE-ID: None
 [2003-07-14 14:07 UTC] ler at lerctr dot org
Description:
------------
The following paragraph from the pg_query php.net page is misleading:

pg_query() returns a query result resource if query could be executed. It returns FALSE on failure or if connection is not a valid connection. Details about the error can be retrieved using the pg_last_error() function if connection is valid. pg_last_error() sends an SQL statement to the PostgreSQL database specified by the connection resource. The connection must be a valid connection that was returned by pg_connect() or pg_pconnect(). The return value of this function is an query result resource to be used to access the results from other PostgreSQL functions such as pg_fetch_array(). 

the 2nd occurance of pg_last_error() should be pg_query.

Reproduce code:
---------------
look at web page.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-14 14:47 UTC] didou@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 19 12:00:02 2025 UTC