I have a huge product which was developed on php5.5, so the queries were written using mysql.
As PHP 7 & > has removed the support of mysql, now I am forced to use mysqli instead, but this will consume too much time for me.
Is there any temporary solution to make mysql queries work with PHP 7 for a while? As I am planing to migrate to mysqli but for mean while I need to make the code work with PHP 7 + mysql.
You could recreate the mysql functions and use mysqli in these. This is not really clean, but it will work and is a fast solution until you can refactor your application
For example:
function mysql_connect($host, $username, $password, $db) {
return mysqli_connect($host, $username, $password, $db);
}
function mysql_query($query){
return $mysqli_query($query);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With