P
P
PowerUSB2018-02-15 15:25:58
PHP
PowerUSB, 2018-02-15 15:25:58

Problem with MySQL query. Where to look for an error?

Hello. My MySQL is giving me a very strange error.
When trying to execute a request from a php script, it returns the following:

billing > [ERROR]:[ID] > 608
 billing > [ERROR]:[TYPE] > db
 billing > [ERROR]:[CLASS] > error
 billing > [ERROR]:[MESSAGE] > SQL query execution failed
 billing > [SQL_ERROR]:[SQL] > INSERT INTO `mls_lottery_tickets` SET `id_lottery` = '2001', `id_draw` = '19', `id_user` = '1', `id_order` = '12', `ticket` = '140', `cost_ticket` = '0.75';
INSERT INTO `mls_lottery_tickets` SET `id_lottery` = '2001', `id_draw` = '19', `id_user` = '1', `id_order` = '12', `ticket` = '141', `cost_ticket` = '0.75';
INSERT INTO `mls_lottery_tickets` SET `id_lottery` = '2001', `id_draw` = '19', `id_user` = '1', `id_order` = '12', `ticket` = '145', `cost_ticket` = '0.75';
INSERT INTO `mls_lottery_tickets` SET `id_lottery` = '2001', `id_draw` = '19', `id_user` = '1', `id_order` = '12', `ticket` = '155', `cost_ticket` = '0.75'
 billing > [SQL_ERROR]:[MESSAGE] > 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 'INSERT INTO `mls_lottery_tickets` SET `id_lottery` = '2001', `id_draw` = '19', `' at line 2

But if I copy the text of the request and execute it in phpMyAdmin, it is executed.
Who has any thoughts on this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2018-02-15
@PowerUSB

Multiple queries, or multiqueries, must be triggered by the mysqli_multi_query() function .
php.net/manual/ru/mysqli.quickstart.multiple-state...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question