1
I created a QUERY with multiple delimiters to run only once and perform UPDATE
in different tables, but gives syntax error when run in PHP, but in Phpmyadmin works normally.
I already checked the permissions of users and you have the proper ones.
UPDATE
`fin_dry1`
SET
`dr_status` = 'P'
WHERE
`dr_token` = '894613';
UPDATE
`fin_dry2`
SET
`dr_status` = 'P'
WHERE
`dr_token` = '894613';
UPDATE
`fin_dry3`
SET
`dr_status` = 'P'
WHERE
`dr_token` = '894613';
You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server version for the right syntax to use near 'UPDATE
fin_dry2
SET `dr_sta.
I discovered the use of multi_query, so I changed the mysqli_query() for mysqli_multi_query() and another error appears:
Commands out of Sync; you can’t run this command now.
About the Mysql server version
Server: Localhost via UNIX socket.
Server type: Percona Server.
Server connection: SSL is not being used Documentation.
Server version: 5.6.41-84.1 - Percona Server (GPL), Release 84.1, Revision b308619.
Version of the protocol: 10.
Strict Standards: mysqli_next_result(): There is no next result set.
– ElvisP
I changed mysqli_next_result() by mysqli_more_results() but it was slow, almost 15 seconds to run.
– ElvisP
I’m orienting myself through the link, thank you.
– ElvisP