How to add multiple rows of data to php
This article will explain in detail how to add multiple rows of data to php. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Php add multiple rows of data methods: 1, create a PHP sample file; 2, connect to the database; 3, through the mysqli_multi_query () function to execute multiple SQL statements and use insert statements to add multiple rows of data to the data table.
This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer
How does php add multiple rows of data?
The mysqli_multi_query () function can be used to execute multiple SQL statements.
The following example adds three new records to the "MyGuests" table:
Instance (MySQLi-object oriented)