How to use Excel Blank Rows to insert new data from foraign table

QuestionsHow to use Excel Blank Rows to insert new data from foraign table
c3media asked 8 months ago

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
Abu Ghufran Staff answered 8 months ago

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

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Abu Ghufran Staff answered 8 months ago

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

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Your Answer

7 + 5 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!