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 6 years 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 6 years 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
Grid 4 PHP Framework
 
Abu Ghufran Staff answered 6 years 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
Grid 4 PHP Framework
 
Your Answer

19 + 15 =

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 / 5. Vote count: 1

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?