1、in 后面是记录集,如:
select * from table where uname in (select uname from user);
2、in 后面是字符串,如:
select * from table where uname in('aaa',bbb','ccc','ddd','eee',ffff'');
3、in 后面是数组,用如下方法,请参考:
//$pieces是含数据的数组
for($i=0;$i<count($pieces);$i++){
$uname=$uname."'".$pieces[$i]."',";
}
$the_uname ="uname in("....