Database error: Invalid SQL: select cal_id,repeat,cal_status from calendar where ((UNIX_TIMESTAMP(CONCAT(cal_syear,'-',cal_smonth,'-',cal_sday)) <= 1277967600 && UNIX_TIMESTAMP(CONCAT(cal_eyear,'-',cal_emonth,'-',cal_eday)) >= 1277967600) || (`repeat` = "Y" && cal_smonth = '07' && cal_sday = '01')) && (cal_status = 'A' || (cal_status = 'T' && '' = '3') || (cal_status = 'P' && '' = owner_id)) order by cal_stime
MySQL Error: 1064 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cal_status from calendar where ((UNIX_TIMESTAMP(CONCAT(cal_syear,'-',cal_smonth' at line 1)
Session halted.