public function getAllAdmin() { //$_sql="select * from admin order by id desc ".$this->limit; $_sql = "select admin.id,\r\n\t\t\t\t admin.username,\r\n\t\t\t\t admin.pwd,\r\n\t\t\t\t admin.level_id,\r\n\t\t\t\t admin.login_num,\r\n\t\t\t\t admin.last_ip,\r\n\t\t\t\t admin.last_time,\r\n\t\t\t\t\t level.name\r\n\t\t\t from admin,level where admin.level_id=level.id and admin.level_id in (" . $this->level_id . ") order by admin.id desc " . $this->limit; //echo $_sql; return parent::getAllResult($_sql); }
public function getAllJudges() { $_sql = "select * from veling_exam_judge where course_id in(" . $this->kind . ") order by id desc " . $this->limit; //echo $_sql; return parent::getAllResult($_sql); }
public function getAllLevel() { $_sql = "select * from level order by id desc " . $this->limit; return parent::getAllResult($_sql); }
public function getAllEntry() { $_sql = "select * from dict order by id desc " . $this->limit; //echo $_sql; return parent::getAllResult($_sql); }
public function getAllFeedback() { $_sql = "select * from feedback order by id desc " . $this->limit; //echo $_sql; return parent::getAllResult($_sql); }
public function getAllMainNav() { $_sql = "select * from nav where pid=0 order by sort desc " . $this->limit; return parent::getAllResult($_sql); }
public function getAllDownloadByTID() { $_sql = "select * from download where tid=" . $this->tid . " order by id desc limit 5"; //echo $_sql; return parent::getAllResult($_sql); }
public function getAllPermission() { $_sql = "select * from permission order by id desc " . $this->limit; return parent::getAllResult($_sql); }
public function getAllArticle() { $_sql = "select * from article where nid in (" . $this->nid . ") order by id desc " . $this->limit; //echo $_sql; return parent::getAllResult($_sql); }
/** * 把表中投票项的投票数相加 * @return multitype: */ public function getAllSubject() { //$_sql="select * from vote where pid=0 order by id desc ".$this->limit; $_sql = "select v.id,\r\n\t\t\t\tv.title,\r\n\t\t\t\tv.description,\r\n\t\t\t\tv.state,\r\n\t\t\t\t(select sum(amount) from vote where pid=v.id)as totalCount\r\n\t\t\t\tfrom vote as v where v.pid=0 order by v.id desc" . $this->limit; return parent::getAllResult($_sql); }
public function getAllComment() { $_sql = "select * from comment where state=1 and aid=" . $this->aid . " order by id desc " . $this->limit; //echo $_sql; return parent::getAllResult($_sql); }
public function getAllAnswers() { $_sql = "select * from ask where pid=" . $this->id . " order by id desc" . $this->limit; //echo $_sql; return parent::getAllResult($_sql); }
public function getAllOrdersByUID() { $_sql = "select * from orders where uid=" . $this->uid . " order by id desc limit 0,15"; return parent::getAllResult($_sql); }
public function getFrontCourse() { $_sql = "select * from course where state=1 order by id desc"; //echo $_sql; return parent::getAllResult($_sql); }
public function getAllUser() { $_sql = "select * from user order by last_time desc " . $this->limit; return parent::getAllResult($_sql); }
public function getAlltopic() { $_sql = "select * from topic order by id desc " . $this->limit; return parent::getAllResult($_sql); }
/** * 1:通栏广告 * 2:banner * 3:slider * 4:sidebar * @param string $_flag * @return multitype: */ public function getFrontAd($_flag) { if ($_flag == 'banner') { $_sql = "select * from ad where type=2 and state=1 order by id desc limit 1"; return parent::getFirstResult($_sql); } elseif ($_flag == 'fullcolumn') { $_sql = "select * from ad where type=1 and state=1 order by id desc limit 1"; return parent::getFirstResult($_sql); } elseif ($_flag == 'sidebar') { $_sql = "select * from ad where type=4 and state=1 order by id desc limit 1"; return parent::getFirstResult($_sql); } elseif ($_flag == 'slider') { $_sql = "select * from ad where type=3 and state=1 order by id desc limit " . SLIDER_NUM; return parent::getAllResult($_sql); } }
public function getAllCategory() { $_sql = "select * from category order by id desc " . $this->limit; return parent::getAllResult($_sql); }