|
|
|
@ -22,7 +22,7 @@ class CageModel extends Orm_Base{ |
|
|
|
|
$limmit = empty($shownum['line_num'])?20:$shownum['line_num']*4; |
|
|
|
|
$sql = "select id,number,color,strains,type from cage where c_user_id={$params['uid']}"; |
|
|
|
|
if(!empty($params['keyword'])){ |
|
|
|
|
$sql .=" and (number like '%{$params['keyword']}%' or strains_id like '%{$params['keyword']}%')"; |
|
|
|
|
$sql .=" and (number like '%{$params['keyword']}%' or strains like '%{$params['keyword']}%')"; |
|
|
|
|
} |
|
|
|
|
if(!empty($params['order'])){ |
|
|
|
|
$sql .=" order by {$params['order']} desc"; |
|
|
|
|