Skip to content
Advertisement

On duplicate key update – implode $row_arr

I have a script in php that writes to the mysql array:

JavaScript

$nr_order is the same for all plu in this order. Works correctly. Adds what you need to the database. I would like to do INSERT ON DUPLICATE KEY UPDATE on the same principle

I wrote something like this:

JavaScript

But this solution writes nothing to the database and stops at $ins_qry… Please help, how can I change the existing ones and add new entries to the database … I would like $ins_qry to check if such plu + nr_order already exists than it edits $il and $op and if not, insert this row.

Advertisement

Answer

Try this:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement