------------------ 原始邮件 ------------------
发送时间: 2009年7月14日(星期二) 上午10:52
主题: [CPHPUG:77] 看看这个sql语句的写法是否有问题
$count_query = "select count(*) as `count` from `articles_category` where date_format(`post_time`,'%m') = '".$month_m."' and date_format(`post_time`,'%y') = '".($year_y)."'";
mysql数据库,where后面是否可以直接date_format()来格式化这个当前这个表的列值?还是要用 子SELECT语句?