Hello, I have two tables (Clients and Cities), then i would like to insert new data in table (Client_Sales) massively by selecting city and then insert clients, city and note cols.
How to use this query example?
$query = mysqli_prepare("INSERT INTO `MyTable` (`col1`,`col2`,`col3`) VALUES(?,?,?)"); foreach($JSON_data as $key => $value) { $query->bind_param('sss',$value["prop1"],$value["prop2"],$value["prop3"]; $query->execute(); }
Regards!
2 Answers
Refer this demo code. It uses same database connection of grid to execute query.
https://www.phpgrid.org/demo/demos/appearance/excel-blank-rows.phps
Line 48,51,87
Refer this demo code. It uses same database connection of grid to execute query.
https://www.phpgrid.org/demo/demos/appearance/excel-blank-rows.phps
Line 48,51,87
Your Answer