assuming that i have two tables, names
and phones
and i want to insert data from some input to the tables, in one query- How can it be done?
Please, if it can be done, explain the syntax.
You can't. However, you CAN use a transaction and have both of them be contained within one transaction.
START TRANSACTION;
INSERT INTO table1 VALUES ('1','2','3');
INSERT INTO table2 VALUES ('bob','smith');
COMMIT;