Need help converting mysql statement to mysqli statement
Posted on 2014-03-10
Our web server has just been updated to use PHP 5.8. When this happened we started getting warning messages about mysql be depreciated and we should use mysqli. I was able to get my database connector converted but I ran into another problem.
There is a routine on our sites with calculates the county sales tax on orders. This was written by a third party who is not around any more. Therefore I'm trying to modify his program and I have run into a problem.
I need to know how to rewrite this query:
$query = mysql_query($sSQL);
If I just change mysql to mysqli, I get an error message "mysqli_query() expects at least 2 parameters, 1 given".
I'm not sure what the other parameter should be.
Any assistance would be appreciated.