07
05月
2015
$sql="select * from tp_product where token ='$token' and name like '%$key%' or intro like '%$key%' or no like '%$key%' or keyword like '%$key%' or catid in(select id from tp_product_cat where name like '%$catkey%')";
$model = M();
$model = M();
$list= $model->query($sql);
like 搜索功能 in()子查询。
特殊说明,本文版权归 ning个人博客 所有带原创标签请勿转载,转载请注明出处.