Hi.
The date is saved in DATETIME type format in mysql db. When I try to run query to match the date in dababase with current date then it does'nt compare and nothing is returned.
Here is the code:
$query_Rec1 = "SELECT * FROM booked_ads WHERE booked_ads.cat_aid='$search_id2' AND booked_ads.cat_bid='$in_category3' AND ". date("Y-m-d",strtotime('booked_ads.start_date')) . " = " . date('Y-m-d') . " AND booked_ads.ad_details LIKE '%$in_details[$i]%' OR booked_ads.ad_heading LIKE '%$in_details[$i]%' ORDER BY booked_ads.cat_aid ASC";
$query_limit_Rec1 = sprintf("%s LIMIT %d, %d", $query_Rec1, $startRow_Rec1, $maxRows_Rec1);
$Rec1 = mysql_query($query_limit_Rec1, $AdData) or die(mysql_error());
$row_Rec1 = mysql_fetch_assoc($Rec1);
$t_row=mysql_num_rows($Rec1);
Can anyone point out what's wrong with the code? I'm really tired after tyring for 3 days.
Thanx