note 11034 deleted from function.mysql-query by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 22:15:43 +0000 |
| Subject: | note 11034 deleted from function.mysql-query by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22287@lists.php.net to get a copy of this message | ||
Hi! Guys and Gals
Remember trying to figure out about how to handle when u one of the insert statements firing and the
rest of them failing. to handle this there would be two approaches, one would be to handle it in the
die part and the other is to execute all of them together. But this feature of executing a block of
statements is supported only at the command line only and if u try to execute this thru your
program, it would report an error due to the semicolon in between your statements, removing the
semicolon will do no good either. Here is how you prepare your statement now:--
$result=(mysql_query("First Insert Statement") && mysql_query("Second Insert
Statement")....) or die("Some readable text");
This was discovered by Ashish and me while working for WorldNetIndia in Chandigarh.
Thanks
Anirudh Pathania