inserting values in to multiple tables
Posted: Fri Jan 19, 2007 6:01 am
Hi I have a php script which i need to run a mysql query to insert values into two tables of my database.
My first question is can this be done in one query statement?
and my second question is
I have 2 tables 1 to hold member subscription details and another to hold member details
i want to update both tables at once however the subscriptions table needs the members id from the members table which is automaically generated by the databse.
So my second question is how can I get this value when updating the member table so that I can simultaneously update the subscriptions table??
I hope this makes sense
thanks in advance
My first question is can this be done in one query statement?
and my second question is
I have 2 tables 1 to hold member subscription details and another to hold member details
i want to update both tables at once however the subscriptions table needs the members id from the members table which is automaically generated by the databse.
So my second question is how can I get this value when updating the member table so that I can simultaneously update the subscriptions table??
I hope this makes sense
thanks in advance