From e0d0f4032985eda9c53ab9c6e546c85574bf5380 Mon Sep 17 00:00:00 2001 From: whatsns <617035918@qq.com> Date: Mon, 2 Mar 2020 16:07:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E7=AB=A0=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E6=95=B0=E5=92=8C=E6=96=87=E7=AB=A0=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/Topic.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/controllers/Topic.php b/application/controllers/Topic.php index 5e4da70..66fcfbb 100644 --- a/application/controllers/Topic.php +++ b/application/controllers/Topic.php @@ -919,7 +919,8 @@ class Topic extends CI_Controller { $commentlist = $this->articlecomment_model->list_by_tid ( $tid, 1, $startindex, $pagesize ); $commentrownum = returnarraynum ( $this->db->query ( getwheresql ( "articlecomment", " tid=$tid AND state=1 ", $this->db->dbprefix ) )->row_array () ); - + //更新评论数 + $this->db->where(array('id'=>$tid))->update('topic',array('articles'=>$commentrownum)); $departstr = page ( $commentrownum, $pagesize, $page, "topic/getone/$topicid" ); // if(is_mobile()){ // include template('getonetopic','wap'); -- GitLab