mysql_result() problems

//youtu.be/Y2nHg6jG9hA

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?

thanks :slight_smile:

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 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 :slight_smile:

No problem, glad you got it working :slight_smile: