select p.id, p.siteid, p.submitor, p.date, p.type, p.summery, p.status from prob
lem p, site s, account a where p.siteid=s.id and s.accountid=a.id and a.disable=
0 and s.disable=0 and p.disable=0 and p.id=15 and DATE_FORMAT(p.date,'%Y-%m-%d')= '2008-11-12' order by p.id
这句话会出错,但如下的语句没错
select id, siteid, submitor, date, type, summery, status from problem where disable=0 and DATE_FORMAT(date,'%Y-%m-%d')= '2008-11-12' order by id应该怎么改。多谢各位。
lem p, site s, account a where p.siteid=s.id and s.accountid=a.id and a.disable=
0 and s.disable=0 and p.disable=0 and p.id=15 and DATE_FORMAT(p.date,'%Y-%m-%d')= '2008-11-12' order by p.id
这句话会出错,但如下的语句没错
select id, siteid, submitor, date, type, summery, status from problem where disable=0 and DATE_FORMAT(date,'%Y-%m-%d')= '2008-11-12' order by id应该怎么改。多谢各位。
解决方案 »
- 取交集查询操作过程中,使用 索引能否提升运行速度 问题请教?
- 有关mysql端口问题
- 帮忙检查以下错误
- 用什么工具查看扩展名为db4的数据库?
- MYSQL:Commands out of sync; you can't run this command now
- MySQL5提示marked as crashed and should be repaired,修复后整个表被清空
- Union + Left Join 新手求助SQL老手
- mysql中乱码问题
- 求教:如何把acess数据导入mysql数据库
- MySQL怎么样在同一实例不同数据库中进行表同步呢?
- 你好:请问听说与MySQL同一个城市的还有另一个数据库Mimer SQL?能给全面的对比一下吗?
- 请教一个SET的插入问题
select id, siteid, submitor, date, type, summery, status from problem where disable=0 and DATE_FORMAT(date,'%Y-%m-%d')= '2008-11-12' order by id 这句也应该出错。
可能是mysql版本太老了。
请问大侠,怎样避免那个错误,应该怎么改,有没有匹配前多少个字符串之类的函数来代替DATE_FORMAT
mid left right 不行?