complicated inserts
- by liysd
I have to do something like this
insert into object (name, value, first_node) values ('some_name', 123, 0)
@id = mysql_last_insert_id()
insert nodes (name, object_id) values ('node_name',@id)
@id2 = mysql_last_insert_id()
update object set first_node=@id2 where id=@id
Is it possible to make it simpler?
What if I want to insert more pairs (object, node) with resonable efficency?