예제 #1
0
파일: pubdata.php 프로젝트: vyouzhis/phpdbi
 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;
 }
예제 #2
0
파일: blog.php 프로젝트: vyouzhis/phpdbi
 private function click()
 {
     $format = 'select id,title,auth from blog  order by rand() desc LIMIT 3';
     $res = parent::FetchArray($format);
     return $res;
 }
예제 #3
0
파일: home.php 프로젝트: vyouzhis/phpdbi
 private function newBlog()
 {
     $sql = "select id,title,`desc`,img,ctime from blog order by ctime desc limit 6;";
     $res = parent::FetchArray($sql);
     return $res;
 }
예제 #4
0
 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;
 }