From 4948e6ff5450dd3476e9bd62293f3a078eb86744 Mon Sep 17 00:00:00 2001 From: "yangsai@163.com" <2624183217@qq.com> Date: Thu, 6 Jun 2024 18:16:35 +0800 Subject: [PATCH] YS --- application/models/Cage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/models/Cage.php b/application/models/Cage.php index c7a82c2..ee1e259 100644 --- a/application/models/Cage.php +++ b/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);