⇧
vadnica-logo
My Services About the Project Telegram O meni O meni

Inserting Multiple Records at Once

Sometimes we want to insert multiple pieces of data into the database with a single script execution. Instead of calling mysqli_query() for each row, we use the mysqli_multi_query() function. We combine all SQL commands into a single string and separate them with a semicolon (;).

EXAMPLE
RESULT
The result will be displayed here...

How do you know all records are in the database? In the simulator, you can see the table with all three rows. In your local environment at home, use phpMyAdmin: