Re: Help: Transactions not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That made a world of difference! :) Thank you.

But - I want to confirm, am I still using transactions
even though I'm issuing individual query calls for
each insert.

And, if I can ask another question to the list : 

In this line (from the second insert)
VALUES (null, LAST_INSERT_ID(), ......)";

The LAST_INSERT_ID works great here, getting the
auto-inc from the first insert, but will it work in
subsequent insertions to other tables.

I ask because in the second insert (shown), the
LAST_INSERT_ID, gets the value from the first table,
but the second table (second insert) also has an
auto-inc column.  So I'm thinking then the third
insert will get the LAST_INSERT_ID from table 2 / 2nd
insert.  

Perhaps I need to declare it the first time as a value
(app code) or add "where" conditions to all the
subsequent insertions ?

Thank you,
Stuart

--- John Holmes <holmes072000@xxxxxxxxxxx> wrote:

> > Am I missing something here ?
> 
> Yep... you're missing a mysql_query() call for each
> query. You're only 
> running one query and echoing the other...
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux