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();

$list= $model->query($sql);



like 搜索功能       in()子查询。

发表评论