$array = mysqli_fetch_array(mysqli_query($link,$result));
Is this a correct PHP/mysqli statement or do I have to run the query first and then the array fetching in two separate statements?
$array = mysqli_fetch_array(mysqli_query($link,$result));
Is this a correct PHP/mysqli statement or do I have to run the query first and then the array fetching in two separate statements?
The code should do, what you want. Assuming the $result
, despite the strange name, is really an SQL query string.
But make sure you have configured mysqli to throw exceptions on error. Otherwise in case of error you will have no means to get the error message.
(Credits go to @Your Common Sense)