SELECT * FROM dy_article AS a LEFT JOIN dy_article_field AS b ON a.id = b.aid WHERE a.id=
执行错误: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

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 />执行错误: " 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);
119.          return $this->update($conditions, array($field=>$value));
120.      }
121. 
122.      public function findSql($sql)
123.      {
124.          return $this->_db->getArray($sql);
125.      }
126. 
127.      public function runSql($sql)
128.      {
129.          return $this->_db->exec($sql);
1035.          $sql "SELECT * FROM ".$GLOBALS['G_DY']['db']['prefix'].$molds." WHERE id={$id}";
1036.      }else{
1037.          $sql "SELECT * FROM ".$GLOBALS['G_DY']['db']['prefix'].$molds." AS a LEFT JOIN ".$GLOBALS['G_DY']['db']['prefix'].$molds."_field AS b ON a.id = b.aid WHERE a.id={$id}";
1038.      }
1039.      
1040.      $res $c->findSql($sql);
1041.      return $res[0][$feild];
1042.  }
1043. 
1044. 
1045.  /**
1216.   *@param             $range 范围,调取几篇。从第一个标签开始算。
1217.   *@copyright         
1218.   **/
1219.  function getRalationArticles($article_id,$range=6){
1220.      $c syDB("article");
1221.      $tag get_value('article','tag',$article_id);
1222. 
1223.      if(!empty($tag)){
1224.          $arr_tag explode("|"$tag);
1225. 
1226.          $result = array();
80.              $this->positions.='  &gt;  <a href="'.html_url('classtype',$d_pos).'">'.$v['classname'].'</a>';
81.          }
82. 
83. 
84.          /*relations start*/
85.          $relations getRalationArticles($id);
86.          $this->relations $relations;
87.          // relations end
88. 
89.          $this->hits();
90.          
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();