Results 1 to 3 of 3
Thread: Select with date = fails
Apr 25, 2009, 22:08 #1
- Join Date
- Mar 2002
- Perth, Western Australia
- 0 Post(s)
- 0 Thread(s)
Select with date = fails
I have the following select statement.
echo "<p>The Current Date Is: ".$the_date;
$query = "select * from `quiz` where quizdate = $the_date";
$result = $db->query($query);
$num_results = $result->num_rows;
$the_date contains the date I want, but the $query is failing, but the quiz table contains an entry with the same date...
I know dates can be tricky. The quizdate field is format date and it looks like: