Is it usefull to convert all my PHP codes from mysql to mysqli? I mean will mysql be deleted? And is there a tool that converts my codes to mysqli? Or do I just have to change all i.e. mysql_query to mysqli_query?
Asked
Active
Viewed 76 times
1 Answers
3
Is it useful?
Yes, read Why shouldn't I use mysql_* functions in PHP? So if you plan on running your code in years to come, you should consider it.
Is there a tool?
This tool if often mentioned but I have never tried it and I think you would learn more by doing it manually. It also seems more complicated than doing it by hand if you're a beginner.
Changing all your mysql_query()
function calls to mysqli_query()
is not enough. The mysqli_query
function requires that you pass a link identifier as the first argument wheareas with mysql_query
"If the link identifier is not specified, the last link opened by mysql_connect() is assumed."
And of course it's not just the mysql_query
calls you would have to change, but all mysql_*
calls.