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"); Link to comment https://forums.phpfreaks.com/topic/189242-mysqli-to-mysql/ 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. Link to comment https://forums.phpfreaks.com/topic/189242-mysqli-to-mysql/#findComment-999073 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.