Connect and query mysql
Posted: Sun Sep 05, 2010 1:32 pm
I had managed to get an small application working with mysqli_connect() and mysqli_query() but the web host I am using is running PHP 5.2.13.
I seem to be able to connect to the database using mysql_connect() and when I use something like: $result = mysql_query($query); to query the database i get a message saying that no database has been selected. I've tried using $db_selected = mysql_select_db(DB_NAME, $dbc); but I get the message saying that it cannot select the database. Can anyone suggest where I'm going wrong
Kind regards
slowcoach620
I seem to be able to connect to the database using mysql_connect() and when I use something like: $result = mysql_query($query); to query the database i get a message saying that no database has been selected. I've tried using $db_selected = mysql_select_db(DB_NAME, $dbc); but I get the message saying that it cannot select the database. Can anyone suggest where I'm going wrong
Kind regards
slowcoach620