<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Symptom_model extends CI_Model
{
private $table = 'symptom';
public function __construct()
{
parent::__construct();
}
public function getAppBbsList($limit=10,$start=0)
{
$this->db->select('bbsId,title,content,imagePath,type,viewNum,brief,createTime,videopath,userId,commentNum,type,relayNum,zanNum');
$this->db->where('examineStatus',1);
$this->db->where('status',0);
$this->db->where('issue',1);
$this->db->where('deleteFlag',0);
$this->db->order_by('viewNum','desc')->order_by('createTime','desc')->limit($limit, $start);
return $this->db->get( $this->table )->result_array();
}
public function getAppBbsBetterList($limit=10,$start=0)
{
$this->db->select('bbsId,title,content,imagePath,viewNum,brief,createTime,userId,videopath,commentNum,relayNum,zanNum,singer,type,videopath,audiopath,audioTitle');
$this->db->where('isBetter ',1);
$this->db->where('examineStatus',1);
$this->db->where('status',0);
$this->db->where('issue',1);
$this->db->where('deleteFlag',0);
$this->db->order_by('betterTime','desc')->limit($limit, $start);
return $this->db->get( $this->table )->result_array();
}
public function gethotBbslist($stime,$etime){
$this->db->where('examineTime >',$stime);
$this->db->where('examineTime <',$etime);
$this->db->order_by('viewNum','desc')->limit(10,0);
return $this->db->get($this->table)->result_array();
}
public function getsymptomRow( $report_id=0 ,$select='name,score')
{
$this->db->select($select);
$this->db->where('report_id', $report_id);
$result = $this->db->get($this->table);
return $result->result_array();
}
}
?>