yangsai@163.com 8 months ago
parent 52facad353
commit 4948e6ff54
  1. 2
      application/models/Cage.php

@ -34,6 +34,8 @@ class CageModel extends Orm_Base{
$sql .=" limit {$offset},{$limmit}";
$data['data'] = $this->query($sql);
foreach($data['data'] as $key => &$val){
//查询鼠编号
$val['squirrel'] = $this->query("select number from squirrel where cage={$val['id']} and is_kill=0 and is_delete=0 and type=1 limit 0,6");
//查询公鼠
$sql = "select count(*) num from squirrel where cage={$val['id']} and is_kill=0 and is_delete=0 and sex=1";
$mannum = $this->query($sql);

Loading…
Cancel
Save