[Solved] Is it possible to insert multiple queries in mysql using php [closed]


if you mean bulk insert, please follow the example given below.

CREATE TABLE example (
  example_id INT NOT NULL,
  name VARCHAR( 50 ) NOT NULL,
  value VARCHAR( 50 ) NOT NULL,
  other_value VARCHAR( 50 ) NOT NULL
)

INSERT INTO example
VALUES
  (100, 'Name 1', 'Value 1', 'Other 1'),
  (101, 'Name 2', 'Value 2', 'Other 2'),
  (102, 'Name 3', 'Value 3', 'Other 3'),
  (103, 'Name 4', 'Value 4', 'Other 4');

OR

if you want to insert data to multiple table, then the solution which is given below is right, write queries for each table.

Note: insert statement is written only once, we are repeating its value.

solved Is it possible to insert multiple queries in mysql using php [closed]