You are here: Postgres Insert return codes « PHP Programming Language « IT news, forums, messages
Postgres Insert return codes

Posted by Syl on 05/18/06 21:45

Hi group -

I am collecitng form data and inserting into multiple tables with a
foregin key.

Can someone tell me why if the insert fails on the 1st insert, then all
the other inserts also return a FAILURE return code :


$delegatecontent = array( "id" => $idnum, "language" => $insertlang );
$delegateres = pg_insert($conn, 'delegate', $delegatecontent);
if ($delegateres) { // echo "success del";
} else {
echo "<b>INSERT Failed!
}

$meetingcontent = array( "fk_meetingsid" => $idnum, "meetingsga" =>
$meetingga );
$meetingres = pg_insert($conn, 'meetings', $meetingcontent);
if ($meetingres) { // echo "success meetings";
} else {
echo "<b>INSERT Failed!
}


What is syntactically wrong with this code ?

THANKS!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация