>
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');
}