cloudy243 Posted January 21, 2010 Share Posted January 21, 2010 Hey i always use mysqli queries, but my new server doesnt work with mysqli. I am having to change to use mysql in a lot of my scripts. Previously i would use something like $con = mysqli_connect($mysqlServer, $mysqlUser, $mysqlPass, $mysqlDatabase) or die ("Site Not Setup"); $sql = "SELECT * FROM posts"; $result = mysqli_query($con, $sql) or die ("Query failed: getNumPosts"); Am i able to do this same thing with mysql, ex: $con = mysql_connect($mysqlServer, $mysqlUser, $mysqlPass, $mysqlDatabase) or die ("Site Not Setup"); $sql = "SELECT * FROM posts"; $result = mysql_query($con, $sql) or die ("Query failed: getNumPosts"); Quote Link to comment Share on other sites More sharing options...
cloudy243 Posted January 21, 2010 Author Share Posted January 21, 2010 I have just tried it, and i cant seem to get it working, it might be my server that isnt working, but plz help and tell me. 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.