Hello,
i have to do multiple inserts/deletes in one query. I'm trying to use semicolon to
separate the commands, like this:
DELETE FROM... ; INSERT INTO ... ; INSERT INTO...
but didn't work. There is a way to do this?
Another question (it's more about mysql): I have three tables A, B , C and i do inserts on
them:
INSERT INTO A...
INSERT INTO B...
INSERT INTO C...
I have another table, D, that have A, B, C foreign keys, id_A, id_B and id_C. I do this
INSERT:
INSERT INTO D(id_A, id_B, id_C) VALUES (LAST_INSERT_ID(), LAST_INSERT_ID(),
LAST_INSERT_ID());
MySQL knows what "table" to look, using the foreign keys, or just get the last value
inserted in DB?
Thanks in advance.
Thiago Miranda