Hello!
I've been trying to work on a small project of mine but I keep encountering this:
In test.php, this is the only PHP code I seem to have and I haven't found anything wrong with it. For additional assurance, I copy-pasted the SQL statement directly from phpmyAdmin but it continues to give me an error so I know for a fact that the SQL query works and there is a result for such a query.
$db = mysql_connect("127.0.0.1",$db_user,$db_password, $db_name);
if(!isset($db)) {
echo 'Error connecting to database...';
} else {
echo 'Success.';
}
$query = mysql_query("SELECT * FROM `book-listing` WHERE 1");
$row = mysql_fetch_row($query);
Any help with this?
I've tried var_dump() and it returns boolean(false). Can't seem to figure out what the mistake is.