Re: array syntax in pg_execute call

From: "Vyacheslav Kalinin" <vka(at)mgcp(dot)com>
To: "G(dot) J(dot) Walsh" <gjwalsh(at)dscdirectionalservices(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: array syntax in pg_execute call
Date: 2008-03-13 01:34:20
Message-ID: 9b1af80e0803121834v1124e2c9i4e4c3e73026ad8e9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

>
pg_execute($pg,"initbadtest",array(testcode,'{0,0,0,0,0,0}','{0,0,0,0,0,0}));
Apparently there's missing quote here and what is testcode? Should it be
'testcode' or $testcode or maybe it is defined constant? Anyway, if you
provided correct table definition your testcode column is declared as array
of char (char(1) to be exact) - CHAR[10] which might be the reason. As for
error messages - PHP emits warnings on query failure so you have to adjust
error_reporting level appropriately to see them, you can also handle errors
in your code for example like this:
$result = pg_execute(...);
if ($result === false) {
print pg_last_error();
die('Query failed');
}

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message G. J. Walsh 2008-03-13 06:16:46 Re: array syntax in pg_execute call
Previous Message G. J. Walsh 2008-03-13 00:23:46 array syntax in pg_execute call