If you’ve moved from MySQL to MySQL in PHP, you may be wondering where the MySQLi counterpart of mysql_result
is. There isn’t one but instead you can used this simple function. It uses the same parameters as mysql_result
.
function mysqliresult($result, $number, $field) {
mysqli_data_seek($result, $number);
$row = mysqli_fetch_assoc($result);
return $row[$field];
}
