I am having to update MySQL to mysqli as my host is upgrading to PHP5.6
I have managed to convert and connect to the database as below
$link_id = mysql_connect("$db_host","$db_user","$db_password");
if (mysql_select_db("$db_database", $link_id));
else
{
echo "connection failed.";
}
converted to
$link_id = mysqli_connect("$db_host","$db_user","$db_password","$db_database");
if ($mysqli->connect_errno) {
echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
I cannot get the fetch results to work, can anyone help me convert the following code
$results = mysql_query("$select", $link_id);
while ($query_data = mysql_fetch_row($results))
{
Many Thanks