RE: [PHP-DB] sql into 2 tables from one action (form)
| From: | Jeraimee Hughes | Date: | Wed, 28 Jun 2000 19:20:04 +0000 |
| Subject: | RE: [PHP-DB] sql into 2 tables from one action (form) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-712@lists.php.net to get a copy of this message | ||
>I need to take data (from a form) and have it INSERT into one table and
>UPDATE another. When I run the code only the first query happens and no
>error is produced. If I comment out one of the queries the other one runs.
>Both queries do work - alone, but when put together only the first
>one runs.
> mysql_query("INSERT INTO changes (id_no,changed_to,program,time)
>VALUES
>('$dataWrong','$dataCorrect','$program',NOW(''))",$db)
> or die("<br><b>Tracking Query Failed: Error 101</b>");
I got it. If I take the 'or die()' directive out of there it works fine. The
or die was killing the script after the first one.