#37431 [Opn->Ana]: pg_send_query doc and operation don't match

From: Date: Sun, 14 May 2006 15:34:45 +0000
Subject: #37431 [Opn->Ana]: pg_send_query doc and operation don't match
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969373017@lists.php.net to get a copy of this message
ID: 37431 Updated by: iliaa@php.net Reported By: cstdenis at ctgameinfo dot com -Status: Open +Status: Analyzed -Bug Type: PostgreSQL related +Bug Type: Documentation problem Operating System: FreeBSD 5.4 PHP Version: 5.1.4 New Comment: The function requires 2 parameters, connection string and then the query. The docs needs to be adjusted to reflect this fact. Previous Comments: ------------------------------------------------------------------------ [2006-05-13 23:36:05] 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-13 23:33:22] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37431&edit=1

« previous php.doc (#969373017) next »