I'm fairly new to PHP but have a great deal of Perl experience for
what it's worth.  I'm having a problem where if I try to use a
parameterized query it fails but pg_last_error() returns nothing.  For

  $result = pg_query_params($pgconn, $update, array($foo, $bar));

  if (! $result) {
      fwrite($fp, "before");
      fwrite($fp, pg_last_error());
      fwrite($fp, "after");

The strings "before" and "after" are showing up in $fp, but nothing
from pg_last_error().  Similarly, if I use pg_prepare() and
pg_execute(), pg_prepare() fails but nothing is returned from

Using pg_query() works, but I need to parameterize the SQL.

The versions I'm using are

  $ php --version
  PHP 5.2.4-2ubuntu5.5 with Suhosin-Patch (cli) (built: Feb 11 2009 
  Copyright (c) 1997-2007 The PHP Group
  Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

and PostgreSQL 8.3.6.

What am I missing?


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to