A
A
Andrey Raboy2015-11-13 15:49:17
MySQL
Andrey Raboy, 2015-11-13 15:49:17

Can mysql_query perform multiqueries?

actually the question in the title
is mysql_query able to perform multi-queries like:
mysql_query("SELECT *** UNION SELECT ***");
or
mysql_query("SELECT *** ; SELECT ***");
Googling didn't come up with a clear answer.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mikhail Smykov, 2015-11-13
@Chronosms

Do you really need to do both at the same time? In any case, one user sends one request, and if there are several, then one by one in a split second. Is it worth bothering at all?

V
Vitaliy Orlov, 2015-11-13
@orlov0562

mysql_ can't, but mysqli_ can: php.net/manual/ru/mysqli.multi-query.php
and use mysql_* in 2015, it 's somehow fu-fu-fu

A
Andrey Raboy, 2015-11-14
@raba

I knew that mysqli has multi_query and query, but it was necessary to execute a multi-query in mysql_query - a training example, I was surprised that you can not do a sql injection like query splitting or use UNION.
Always thought mysql_query was the same thing as executing...
used to be able to execute multiple queries? Exceptionally curious.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question