select *, date_format(wdate, '%Y-%m-%d') as wdate2
from tb_notice where idx is not null and is_notice='Y' and is_teacher_notice='N' order by display, wdate desc SQLSTATE[42S22]: Column not found: 1054 Unknown column 'is_teacher_notice' in 'where clause' select ifnull(count(*),0) as cnt from tb_notice where idx is not null and is_notice='N' and is_teacher_notice='N' SQLSTATE[42S22]: Column not found: 1054 Unknown column 'is_teacher_notice' in 'where clause' select *, date_format(wdate, '%Y-%m-%d') as wdate2
from tb_notice where idx is not null and is_notice='N' and is_teacher_notice='N' order by display, wdate desc limit 1, 19 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'is_teacher_notice' in 'where clause'