求 sql select如何同时查询2个值

WBOY
Release: 2016-06-13 12:36:35
Original
1419 people have browsed it

求 sql select怎么同时查询2个值
比如 在数据库中 一个键hide=y和hide=n 要同时实现出等于y和n的数据要怎么写
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的

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template