Hello again,
I am having some trouble searching for all records that exist with a certian date in one of my tables.
I have a site where people can book a skydive and when they submit I "INSERT" a date into my table with the date() function. This code is as follows:
$date = date('Y:m:d');
It inserts into table_name in exactly this format: dd/mm/yyyy.
I search for all records (a.k.a "rows") using this code:
$query =(" SELECT *
FROM table_name
WHERE date = '$bookDate'") or die(mysql_error());
//query DB
$result = mysql_query($query);
//get number or rows
$num_rows = mysql_num_rows($result);
echo '<p>Number of bookings found:'.$num_rows.'</p>';
I know there is an entry in my table that is exactly 18/07/2007 but when i search for it $num_rows echos out:
Number of bookings found: 0
Can anyone give me some advice here?
Thanks in advance for your time.