On Tue, 11 Sep 2001 08:40:05 -0400, you wrote:
>is there a way to tell if an insert failed while a in a loop. I tried this: $query =
>"my query";
>if (!$query)
>{
>logic here
>}
> but this is not working... is this even possible?
By query, are you talking about SQL? I'm assuming you're trying to do
run a MySQL INSERT statement.
if (mysql_query("INSERT INTO [...]", $connection)==0) {
/* failure */
}
Works for me, but is equivalent to what you appear to be doing. Can
you post a small piece of code showing what isn't working?
djo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]