SteveJ Posted October 25, 2012 Report Share Posted October 25, 2012 Hello, I am using Uniform Server 5-6-13. I am trying to use mysqli, but when I use the mysqli_connect command, my php web page does not render (blank page). It renders fine with mysql_connect. I looked in php.ini and my extension appears to be good: extension=php_mysqli.dll with no semi-colon before it. I ran my connect page (using mysql_connect) and this code: $text = var_dump(function_exists('mysqli_connect'));echo $text; it printed to the page "bool(true)", which I understand means that mysqli does exist. I must be missing a setting somewhere. I hope you know where... Thanks! -Steve Quote Link to comment Share on other sites More sharing options...
SteveJ Posted October 26, 2012 Author Report Share Posted October 26, 2012 Hello, I found my problem. When using mysqli, you must reverse the order of your parameters on mysqli_select_db (which is now only used when you want to change the database as the database is now declared in the connect function), and in the mysqli_query function. The proper orders are: $con = mysqli_connect($host, $user, $pass, $database);//mysqli_select_db($con, $database); use only if you want to change the default database mysqli_query($con, $recordset); -Steve Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.