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
Insert and Update in single mysql query
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sreejesh SPRank #1,975 · 740 reputationPosted Mar 21, 2013, 8:31 PM EDT
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
Akshay Homkar17 reputationPosted Mar 23, 2013, 9:40 PM EDT