Fetching data from mySQL Database using PHP - Not working
I am trying to fetch data from a database but it seems not to work.
This is the code:
// Check if date already exists in the database
$searchQuery = "SELECT * from services WHERE 'date' = '".$newDate."'";
// echo $searchQuery;
$search = mysql_query($searchQuery);
$row = mysql_fetch_array($search);
When I echo the $searchQuery to check the syntax it is correct. I have copied and pasted it into phpMyadmin and run the query there and the result is found. However, for some reason it will not display on the web page. I don't know if this matters but when I run the query in phpMyAdmin - It says "Showing rows 0 - 0 ( 1 total, Query took 0.0007 sec)" - Does this matter?
What could be wrong?