#44789 [NEW]: pg_execute() doesn't work (as documented?)
| From: | php at benjaminschulz dot com | Date: | Sun, 20 Apr 2008 21:14:32 +0000 |
| Subject: | #44789 [NEW]: pg_execute() doesn't work (as documented?) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-124393@lists.php.net to get a copy of this message | ||
From: php at benjaminschulz dot com
Operating system: osx
PHP version: 5.2CVS-2008-04-20 (CVS)
PHP Bug Type: *General Issues
Bug description: pg_execute() doesn't work (as documented?)
Description:
------------
This sample code is a customized version of the sample from
http://php.net/pg_execute
Reproduce code:
---------------
$dbconn = pg_connect(...)
// Prepare a query for execution
$result = pg_prepare($dbconn, "my_query", 'SELECT $1');
// Execute the prepared query. Note that it is not necessary to escape
// the string "Joe's Widgets" in any way
$result = pg_execute($dbconn, "my_query", array("Joe's Widgets"));
// Execute the same prepared query, this time with a different parameter
$result = pg_execute($dbconn, "my_query", array("Clothes Clothes
Clothes"));
Expected result:
----------------
No errors ;)
Actual result:
--------------
Warning: pg_prepare(): Query failed: ERROR: could not determine data type
of parameter $1 in ...
Warning: pg_execute(): Query failed: ERROR: prepared statement "my_query"
does not exist in ...
Warning: pg_execute(): Query failed: ERROR: prepared statement "my_query"
does not exist in ...
--
Edit bug report at http://bugs.php.net/?id=44789&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44789&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44789&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44789&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44789&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44789&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44789&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44789&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44789&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44789&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44789&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44789&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44789&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44789&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44789&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44789&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44789&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44789&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44789&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44789&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44789&r=mysqlcfg