April 30, 2012
php display blank and error on mysqli_fetch_array
Question by raindrop
I receive a blank page when I try connect to mysql, based on the error. php doesn’t like the 3rd line
$link = "SELECT * FROM `Table` WHERE `id`='$id'";
$results = mysqli_query($db,$link);
$qdata = mysqli_fetch_array($results);
This code is working on my old server, so mysqli_fetch_array
seems absolute? Or did I miss something else on my php config?
Thanks!
This is the error message
Fatal error: Call to undefined function mysqli_connect() in /opt/php_script/connect.php on line 14
Line 14 is
$link = "SELECT * FROM `Table` WHERE `id`='$id'";
Answer by Starx
Your mysqli
extendion is not enabled. Check your php.ini
, go to the extensions part and enable it.