following is my sql query in which i am trying to filter the result as per dates (Greater than) difference. The SQL function “Date(FROM_UNIXTIME(i_last_updated))” returns the dates successfully but the following query is not filtering the results as per where clause check. Kindly let me know is there something wrong with my sql query and how can i correct that. Thank you
NOTE: “I successfully did it by using simple if/else but i want to know is there any possible way to do it with sql query”
$d= "2012-12-25"
$sql2 = "SELECT attendees FROM event_attendees where Date(FROM_UNIXTIME(i_last_updated)) > $d";
You missed the
'around the date variable: