hello
need some help in my syntax here. i want to take only days that are on a sunday or that are not on a sunday. im not sure i think have asked a similiar question, in case so appologize for the double posting. anyway heres what i got:
$sql = 'SELECT DATE_FORMAT(date,"%a") AS cur_day, date,day,download,heading,id,listen,listen_link,text,timestamp FROM webcasts ORDER BY date DESC';
what i really want to be doing is this, use cur_day and make sure its not a sunday
$sql = 'SELECT DATE_FORMAT(date,"%a") AS cur_day, date,day,download,heading,id,listen,listen_link,text,timestamp WHERE DATE_FORMAT(date,"%a") AS cur_day2 != "Sun", FROM webcasts ORDER BY date DESC';
what is the correct syntax here? why cant i use the variable that is defined as cur_day - WHERE cur_day != 'Sun' -> unknown column 'cur_day'
any help would be appreciated.