标题: 求助:php使用mysql,无where子句,报错 [打印本页] 作者: InternetSweeper 时间: 2007-10-16 10:19 标题: 求助:php使用mysql,无where子句,报错 用php连mysql的时候类似下面的查询语句就会报“Unknow Mysql Error”的错误。
select * from table1 limit 0,20
或者 select count(*) from table1都不行。
奇怪的问题是mysql命令行方式下这些语句都能成功执行。
我试了下把select * from table1 limit 0,20 换成 select * from table1 limit 1,20
或者select * from table1 where 1=1 limit 0,20 就没有问题啦
把 select count(*) from table1 换成 select count(*) from table1 where 1=1也没有问题。