Grammar:
WHERE column inch (value1,value2,...) WHERE column not inch (Value1,value2,...)
1, in the back is the recordset, such as:
Select * from Table where Uname in (select uname from user
Example:
SELECT * FROM article WHERE uid in (SELECT uid from user where status=0)
In this SQL example, we implemented all articles that identified all users with a status of 0 (which may be forbidden). First, all status=0 users are given a single query:
2, in followed by a string, such as:
Select * from Table where Uname in ('aaa', BBB','CCC ' , 'ddd','eee', ffff'
Note: Be sure to label the string in single quotation marks;
3, in the following is an array, as follows, please refer to:
$list is ' 1, 2, 3, 4, 5 '
foreach (Explode (',' as $value) { $rules=$rules. " ' ". $value." ' ,"; } $arr= selectall('slim_auth_rule , DB, $this ' inch (". $rules." '),'id,title');
Mysql in statement query