I have two queries, as following:
SELECT SQL_CALC_FOUND_ROWS Id, Name FROM my_table WHERE Name LIKE \'%prashant%\' LIMIT 0, 10;
SELECT FOUND_ROWS();
<
You have to use MySQLi, below code works well
multi_query($query)) {
do {
/* store first result set */
if ($result = $mysqli->store_result()) {
while ($row = $result->fetch_row()) {
printf("%s\n", $row[0]);
}
$result->free();
}
/* print divider */
if ($mysqli->more_results()) {
printf("-----------------\n");
}
} while ($mysqli->next_result());
}
/* close connection */
$mysqli->close();
?>