Reputation: 453
php
is about to stop support for mysql
functions, and there are lots of tools/recommendations for how to upgrade to upgrade to mysqli from mysql. I came up with this design, and I wonder if there are any issues that my solutions can have:
$_CONN;
mysql_query($q)
{mysqli_query($_CONN,$q);}
mysql_error()
{mysqli_error($_CONN);}
mysql_connect($h,$u,$p)
{$_CONN=mysqli_connect($h,$u,$p);}
mysql_fetch_assoc($r)
{mysqli_fetch_assoc($r);}
mysql_fetch_array($r)
{mysqli_fetch_array($r);}
Are there any issues with my solution?
Upvotes: 1
Views: 110
Reputation: 157870
To move from mysql to mysqli in a painless way you have to move towards PDO
Upvotes: 4