Hello
I like to know that shall we insert and update the information in to two different tables in MySQL using single query in PHP please give one example
please help
awaiting for your valuable reply
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Akshay HomkarPosted Mar 24, 2013, 1:40 AM
Sreejesh SPPosted Mar 22, 2013, 12:31 AM
Table1(id int pk identity=true,name)
Table2(add int pk identity=true,id,address)
insert into table1(name)
values("hari")
Declare @id numeric(18,0)
set @id=@@identity
inert into table2(id,address)
values(@id,"ekm")
Thanks
Sreejesh