|
|
|
@ -21,8 +21,8 @@ class CageModel extends Orm_Base{ |
|
|
|
|
$shownum = $cagemodel->field('line_num')->where("c_user_id='{$params['uid']}'")->fRow(); |
|
|
|
|
$limmit = empty($shownum['line_num'])?20:$shownum['line_num']*5; |
|
|
|
|
$sql = "select cage.id,cage.number,cage.color,strains.title strains,cage.type from cage left join strains on cage.strains=strains.id"; |
|
|
|
|
if(!empty($params['keywords'])){ |
|
|
|
|
$sql .=" where cage.number like '%{$params['keywords']}%'"; |
|
|
|
|
if(!empty($params['keyword'])){ |
|
|
|
|
$sql .=" where cage.number like '%{$params['keyword']}%'"; |
|
|
|
|
} |
|
|
|
|
if(!empty($params['order'])){ |
|
|
|
|
$sql .=" order by cage.{$params['order']} desc"; |
|
|
|
|