I am trying to do multiple insertions using mysqli_multi_query()
and following is my code. The issue is its not executing the result . Kindly let me know what i did wrong?
$query = "INSERT INTO crap_table (name, number, class)VALUES ('Peter', 35,'BS')";
$query .= "INSERT INTO crap_table (name, number, class)VALUES ('Sahil', 35,'MS')";
mysqli_multi_query($con,$query);
You forgot
;
between your queries.mysqli_multi_query
You need to have a
;
between them. LikeProvided that you are connected to the database already? Like