Answer the question
In order to leave comments, you need to log in
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
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?
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
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 questionAsk a Question
731 491 924 answers to any question