Closed KirDE closed 3 years ago
@KirDE Use SQL JOIN.
@Andrews54757 i need two tables as result and they have completely different set of data. actually it is a procedure that is called. Currently we are doing it with new mysqli connection, but i don't like this solution.
@KirDE What do you mean? Please elaborate on what SQL procedure you want to do. What would be the query?
Lots of times, Multi-querying can be simply replaced with seperate queries.
The multi_query function is not in this library as it only applies to MySQL. In order to use with PDO, then it would be much harder.
If you still want to use PDO for multi-querying, then refer to this thread: https://stackoverflow.com/questions/6346674/pdo-support-for-multiple-queries-pdo-mysql-pdo-mysqlnd
We have 2 SELECT Queries stored as single Procedure in mysql DB. We are not allowed to change this procedure to separate this queries.
@KirDE Oh, okay. Sorry, I thought you were meaning something else. Anyway, in your case you would have to use PDOStatement::nextRowset.
@KirDE There is a helpful resource here: https://www.ibm.com/support/knowledgecenter/en/SSSNY3_10.1.0/com.ibm.swg.im.dbclient.php.doc/doc/t0023501.html
Is there a support for multi_query mysqli function where multiple tables are returned as result? If running $medoo->query()->fetchAll(); only first table is returned