SELECT * FROM dy_fields WHERE molds='article' and types like '%|130|%' and lists=1 ORDER BY fid
執(zhí)行錯(cuò)誤: File './www_hppx_net/dy_fields.MYD' not found (Errcode: 13 - Permission denied)

34.          $this->arrSql[] = $sql;
35.          if( $result mysql_query($sql$this->conn) ){
36.              return $result;
37.          }else{
38.              if(mysql_error()!=''){
39.                  syError("{$sql}<br />執(zhí)行錯(cuò)誤: " mysql_error());
40.              }else{
41.                  return TRUE;
42.              }
43.          }
44.      }
3.  class db_mysql {
4.      public $conn;
5.      public $arrSql;
6.      public function getArray($sql)
7.      {
8.          if( ! $result $this->exec($sql) )return array();
9.          if( ! mysql_num_rows($result) )return array();
10.          $rows = array();
11.          while($rows[] = mysql_fetch_array($result,MYSQL_ASSOC)){}
12.          mysql_free_result($result);
13.          array_pop($rows);
50.          }else{
51.              $sort "ORDER BY {$this->pk}";
52.          }
53.          $sql "SELECT {$fields} FROM {$this->tbl_name} {$where} {$sort}";
54.          if(null != $limit)$sql $this->_db->setlimit($sql$limit);
55.          return $this->_db->getArray($sql);
56.      }
57. 
58.      public function escape($value)
59.      {
60.          return $this->_db->__val_escape($value);
95.        // 自定義查詢
96.              // if($this->syArgs('trait'))$w.="and trait like '%,".$this->syArgs('trait').",%' ";
97.        if($this->syArgs('year')) $w.=" and FROM_UNIXTIME(addtime, '%Y') = ".$this->syArgs('year')." ";
98.              if($this->syArgs('trait'))$w.="and trait like '%,".$this->syArgs('trait').",%' ";
99.              $order=' order by orders desc,addtime desc,id desc';
100.              $f=syDB('fields')->findAll(" molds='article' and types like '%|".$tid."|%' and lists=1 ");
101.              if($f){
102.                  foreach($f as $v){$fields.=','.$v['fields'];}
103.                  $sql='select id,tid,title,style,trait,gourl,addtime,hits,litpic,orders,mrank,mgold,isshow,description,htmlurl,htmlfile,user'.$fields.' from '.$this->db.' a left join '.$this->db.'_field b on (a.id=b.aid)'.$w.$order;
104.              }else{
105.                  $sql='select id,tid,title,style,trait,gourl,addtime,hits,litpic,orders,mrank,mgold,isshow,description,htmlurl,htmlfile,user from '.$this->db.$w.$order;
11.      $handle_controller syClass($__controllernull$GLOBALS['G_DY']["controller_path"].'/'.$__controller.".php");
12.      if(!is_object($handle_controller) || !method_exists($handle_controller$__action)){
13.          syError('route Error');
14.          exit;
15.      }
16.      $handle_controller->$__action();
17.      if(FALSE != $GLOBALS['G_DY']['view']['auto_display']){
18.          $__tplname $__controller.$GLOBALS['G_DY']['view']['auto_display_sep'].
19.                  $__action.$GLOBALS['G_DY']['view']['auto_display_suffix']; 
20.          $handle_controller->auto_display($__tplname);
21.      }
1.  <?php
2.  require("config.php");
3.  $doyoConfig['view']['config']['template_dir'] = APP_PATH.'/template/'.$doyoConfig['ext']['view_themes'];
4.  require(DOYO_PATH."/sys.php");
5.  spRun();