<?php /* * * MySQL_5.5中文参考手册 485开始 * * mysql> SELECT CASE 1 WHEN 1 THEN 'one' -> WHEN 2 THEN 'two' ELSE 'more' END; -> 'one' mysql> SELECT CASE WHEN 1>0 THEN 'true' ELSE 'false' END; -> 'true' mysql> SELECT CASE BINARY 'B' -> WH
转自:http://www.cnblogs.com/likwo/archive/2010/04/16/1713282.html 查询一天: select * from table where to_days(column_time) = to_days(now());select * from table where date(column_time) = curdate(); 查询一周: select * from table where DATE_SUB(CURDATE(), INTER
(转载)http://www.cnblogs.com/likwo/archive/2010/04/16/1713282.html 查询一天: select * from table where to_days(column_time) = to_days(now());select * from table where date(column_time) = curdate(); 查询一周: select * from table where DATE_SUB(CURDATE(), INTE