php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #37431 pg_send_query doc and operation don't match
Submitted: 2006-05-13 23:33 UTC Modified: 2006-05-16 02:09 UTC
From: cstdenis at ctgameinfo dot com Assigned: ramsey (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.1.4 OS: FreeBSD 5.4
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cstdenis at ctgameinfo dot com
New email:
PHP Version: OS:

 

 [2006-05-13 23:33 UTC] cstdenis at ctgameinfo dot com
Description:
------------
Warning: pg_send_query() expects exactly 2 parameters, 1 given 

According to the docs

bool pg_send_query ( resource connection, string query )
bool pg_send_query ( string query )


One of those is wrong, and I'm betting on the code since all the other functions in the group accept 1 OR 2 prameters.

Reproduce code:
---------------
pg_send_query ("insert into test (test1, test2) ('a', 1)");

Expected result:
----------------
Query executed.

Actual result:
--------------
Warning: pg_send_query() expects exactly 2 parameters, 1 given 

Query not executed.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-13 23:36 UTC] cstdenis at ctgameinfo dot com
Mistyped the query. Should be

pg_send_query ("insert into test (test1, test2) values ('a', 1)");

not that it matters, its just an example.
 [2006-05-14 15:34 UTC] iliaa@php.net
The function requires 2 parameters, connection string and then 
the query. The docs needs to be adjusted to reflect this fact.
 [2006-05-14 17:24 UTC] cstdenis at ctgameinfo dot com
Function should not require 2 parameters.

All the other functions in the group can work with the last established connection if the connection is not specified. 

The function should be modified to conform to that standard.
 [2006-05-16 02:08 UTC] ramsey@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

I've adjusted the docs according to Ilia's comment. If the function needs to be modified in the engine, then a new bug needs to be created as a "Feature/Change Request."
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 02 12:00:03 2025 UTC