Convert mysql_ function calls to mysqli_ procedural routines.

Convert the `mysql_` calls that are deprecated in latest versions of php with the procedural `mysqli_` calls to avoid php warnings. Exact one-for-one swap, no other changes.