This question already has an answer here:
- MySQLi equivalent of mysql_result()? 11 answers
I am getting this error while changing from mysql_result to mysqli_result
function f_exists($f_uname) {
$f_uname = sanitize($f_uname);
$conn = @mysqli_connect('localhost','root','','swift') or die($connect_error);
$query = mysqli_query($conn,"SELECT COUNT(`f_id`) FROM `flight_users` WHERE `f_uname`= '$f_uname'") or die(mysqli_error($conn));
//here is the problem
return (mysql_result($query, 0) == 1) ? true : false;
}