|
Posted by Rik on 05/18/06 23:19
Syl wrote:
> Can someone tell me why if the insert fails on the 1st insert, then
> all the other inserts also return a FAILURE return code :
Do you mean that after performing:
> $delegateres = pg_insert($conn, 'delegate', $delegatecontent);
This also returns also false, while it should be true (you verified it
worked)?
> $meetingres = pg_insert($conn, 'meetings', $meetingcontent);
I'm not aware on anthything wrong with the syntax (never used pg_insert()
though), but why not:
if (pg_insert($conn, 'delegate', $delegatecontent)) {
// echo "success del";
} else {
echo "<b>INSERT Failed!
}
BTW: User comment on php.net:
ANDYCHR17 ***********
05-May-2006 11:50
- Function was returning false until I passed the PGSQL_DML_EXEC option.
So, try pg_insert($conn, 'delegate', $delegatecontent, PGSQL_DML_EXEC);
Grtz,
--
Rik Wasmus
[Back to original message]
|