sql的语句不是很懂 我是这么写的 虽然没报错
select * from blog where type='$type' $author and hide='y' and hide='n' $condition $limit
但是却都不显示
select * from blog where type='$type' $author and hide='y' $condition $limit
这样就可以 但是这能显示等于y的 不能实现出等于n的
回复讨论(解决方案) 你的 $author $condition 分别是什么?
类似的,修改看看
select * from `blog` where `type` = $type and `author` = $author and `hide` in (y, n)limit
用or不就可以了嘛。干嘛要用and呀~怎么可能同时等于y又等于n