|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6421 PEAR - error emulating prepare/execute with PostgreSQL
Submitted: 2000-08-29 14:51 UTC Modified: 2001-06-01 15:30 UTC
From: heino at bigfoot dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0 Latest CVS (29/08/2000) OS: Debian 2.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
21 - 9 = ?
Subscribe to this entry?

 [2000-08-29 14:51 UTC] heino at bigfoot dot com
What does the following line in DB/common.php do ?

(line 182:) $stmt = (int)$this->prepare_maxstmt++;

I have to outcomment the line when I recall execute() on the same prepared query! 

In the original code $realquery, in execute(), is set to the following string when calling it again with the same prepared query...

[db_error: message="DB Error: invalid" code=-8 mode=return level=notice prefix="" prepend="" append=""]




$dsn = 'pgsql://';

$db = new DB_pgsql();

$stm = $db->prepare('SELECT * FROM pg_type WHERE typname = ? ORDER BY typname;');

$r1 = $db->execute($stm, array('_point'));
$r2 = $db->execute($stm, array('_bit'));

while($b = $db->fetchrow($r1)) {
    echo $b[0].' - '.$b[1].'<br>';

while($b = $db->fetchrow($r2)) {
    echo $b[0].' - '.$b[1].'<br>';



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-07 13:08 UTC]
Have you tried a newer version of PEAR/DB, for instance the one that ships with PHP 4.0.5?
 [2001-06-01 15:30 UTC]
No feedback, assumed fixed in recent versions.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Nov 28 11:01:29 2023 UTC