private function newAnalysis($p) { $p == 1 && ($p = 0); if ($p > 0) { $p = $p - 1; } $format = "select * from analysis where cid=%d order by ctime desc LIMIT %d , %d"; $sql = sprintf($format, $this->switch, 2 * $p, 2); $res = parent::FetchArray($sql); return $res; }
private function click() { $format = 'select id,title,auth from blog order by rand() desc LIMIT 3'; $res = parent::FetchArray($format); return $res; }
private function newBlog() { $sql = "select id,title,`desc`,img,ctime from blog order by ctime desc limit 6;"; $res = parent::FetchArray($sql); return $res; }
private function queryCommendVideo() { $video = array(); $sql_top = "SELECT fid , title ,link,flashurl ,titlepic,flashtime,flashsay,addtime FROM " . DB_PRE . "flash WHERE `is_display` = '1' ORDER BY fid DESC LIMIT 5 "; $video = parent::FetchArray($sql_top); return $video; }