Re: [PHP-DB] Multiple Inserts with mySQL

2002-11-14 Thread Anthony
hmm, I guess that would work. There is no way to have mySQL check for integrity for me is there? I read in a SQL book a while ago about wrapping multiple inserts in a select statement, that way if any part of the statement failed the whole thing would be rolled back. From my research

Re: [PHP-DB] Multiple Inserts with mySQL

2002-11-14 Thread Anthony
hmm, I guess that would work. There is no way to have mySQL check for integrity for me is there? I read in a SQL book a while ago about wrapping multiple inserts in a select statement, that way if any part of the statement failed the whole thing would be rolled back. From my research

Re: [PHP-DB] Multiple Inserts with mySQL

2002-11-14 Thread Adam Voigt
10 Seconds searching in the MySQL Manual: http://www.mysql.com/doc/en/ANSI_diff_Transactions.html You have to use InnoDB tables, but this will work. On Thu, 2002-11-14 at 11:26, Anthony wrote: hmm, I guess that would work. There is no way to have mySQL check for integrity for me is there?

Re: [PHP-DB] Multiple Inserts with mySQL

2002-11-13 Thread Peter Beckman
Try this: $stack is an array of hashes: $stack[0] = array(0=tablename, 1=insertid()); For each insert you do, push an anonymous array on $stack which includes the tablename and insertid of the insert. Then as you continue your inserts, if any of them fail, call a function which takes that