本人用的触发器。
if(最后一条数据的时间等于当天) then
1
else
0
end if;
或者帮我换换思路SELECT if( DATE_FORMAT(regdate,'%Y%m%d')=DATE_FORMAT(NOW(),'%Y%m%d'),1,0 ) ORDER BY regdate DESC limit 1;
这样不行
if(最后一条数据的时间等于当天) then
1
else
0
end if;
或者帮我换换思路SELECT if( DATE_FORMAT(regdate,'%Y%m%d')=DATE_FORMAT(NOW(),'%Y%m%d'),1,0 ) ORDER BY regdate DESC limit 1;
这样不行
解决方案 »
- mysql 连接查询,如何得到总的记录条数
- mysql where 语句问题
- 请教一个mysql的关于多表查询的问题
- mysql如何取出同一部门id最大的人
- 大白天见鬼了!!!
- I have download the sourcecode of the Mysql . but I can not find the development document(I have try my best to do it )
- XP下MYSQL如何工作!
- mysql难道不支持嵌套查询?
- 请给一个MySql的下载URL.
- update与select嵌套的问题
- mysql gbk_chinese_ci 字符集 插入 '婳' 等字显示是问号?
- 请问PostgreSQL中如何设置字段自动递增?
from (
select max(regdate) as t from tb
)T