Hi guys, i was following this video tutorial.. then i came across this function - mysql_result($query_run,0,'id') .Is at the video time 7:00.
Ok, the problem is i have been using mysqli to connect to my db, mysqli_query etc.
I tried using mysql_result($query_run,0,'id') but it give me this error - mysql_result() expects parameter 1 to be resource.
Then i tried mysqli_result($query_run,0,'id') they give me this error - Call to undefined function mysqli_result()
So is the a way to solve this without changing all mysqli to mysql and able to get the same result?
The MySQL result function was changed in MySQLi into a class of methods which you can see [here, the method you would want to use would be [URL="http://www.php.net/manual/en/mysqli-result.fetch-array.php"]mysqli_result::fetch_array](http://php.net/manual/en/class.mysqli-result.php) which returns an array with the results you requested.
Thanks for the clear explanation! I tried mysqli_fetch_array, it works exactly as what is intended. Thanks for your help
No problem, glad you got it working
This topic is now closed. New replies are no longer allowed.