$sql = "select count(*) from snake_xcx_order where agent_id = 16 and create_time between UNIX_TIMESTAMP(CAST(SYSDATE()AS DATE)) and UNIX_TIMESTAMP(CAST(SYSDATE()AS DATE) + INTERVAL 1 DAY)";
http://www.jb51.net/article/41770.htm
http://blog.csdn.net/u010716097/article/details/54985039