SELECT COUNT(cid) AS SP_COUNTER FROM tj_comment WHERE isshow = '1' AND aid = '238' AND molds = 'article'
执行错误: Table 'bjpunichina.tj_comment' doesn't exist

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);
151.              $where "WHERE ".join(" AND ",$join);
152.          }else{
153.              if(null != $conditions)$where "WHERE ".$conditions;
154.          }
155.          $sql "SELECT COUNT({$this->pk}) AS SP_COUNTER FROM {$this->tbl_name} {$where}";
156.          $result $this->_db->getArray($sql);
157.          return $result[0]['SP_COUNTER'];
158.      }
159. 
160.      public function __call($name$args)
161.      {
274.          if('findSql'==$func_name){
275.              $a=$this->model_obj->findSql("SELECT COUNT({$this->model_obj->pk}) as sp_counter FROM ($conditions) sp_tmp_table_pager1");
276.              $a=array_pop$a );
277.              $total_count array_pop$a );
278.          }else{
279.              $total_count $this->model_obj->findCount($conditions);
280.          }
281.          if($total_count $pageSize){
282.              $total_page ceil$total_count $pageSize );
283.              $page min(intval(max($page1)), $total_count); // 对页码进行规范运算
284.              $this->pageData = array(
251.          return $this;
252.      }
253. 
254.      public function __call($func_name$func_args){
255.          if( ( 'findAll' == $func_name || 'findSql' == $func_name ) && != $this->input_args[0]){
256.              return $this->runpager($func_name$func_args);
257.          }elseif(method_exists($this,$func_name)){
258.              return call_user_func_array(array($this$func_name), $func_args);
259.          }else{
260.              return call_user_func_array(array($this->model_obj$func_name), $func_args);
261.          }
69.              $d_pos=syDB('classtype')->find(array('tid'=>$v['tid']),null,'tid,molds,htmldir,htmlfile,mrank');
70.              $this->positions.='  &gt;  <a href="'.html_url('classtype',$d_pos).'">'.$v['classname'].'</a>';
71.          }
72.          //if(funsinfo('comment','isshow')==1){
73.              $comment_c=syClass('c_comment');
74.              $this->comments=$comment_c->syPager($this->syArgs('comment_page',0,1),10)->findAll(array('isshow'=>1,'aid'=>$id,'molds'=>'article'),' addtime desc ');
75.              $c_page=$comment_c->syPager()->getPager();
76.              $this->comment_page=pagetxt_comment($c_page,$GLOBALS['G_DY']['url']["url_path_base"].'?c=article&id='.$id);
77.          //}
78.          //手动添加 相关文章
79.          $this->samearticle $this->samearticle($this->article['title']);
69.              $d_pos=syDB('classtype')->find(array('tid'=>$v['tid']),null,'tid,molds,htmldir,htmlfile,mrank');
70.              $this->positions.='  &gt;  <a href="'.html_url('classtype',$d_pos).'">'.$v['classname'].'</a>';
71.          }
72.          //if(funsinfo('comment','isshow')==1){
73.              $comment_c=syClass('c_comment');
74.              $this->comments=$comment_c->syPager($this->syArgs('comment_page',0,1),10)->findAll(array('isshow'=>1,'aid'=>$id,'molds'=>'article'),' addtime desc ');
75.              $c_page=$comment_c->syPager()->getPager();
76.              $this->comment_page=pagetxt_comment($c_page,$GLOBALS['G_DY']['url']["url_path_base"].'?c=article&id='.$id);
77.          //}
78.          //手动添加 相关文章
79.          $this->samearticle $this->samearticle($this->article['title']);
7.      $handle_controller syClass($__controllernull$GLOBALS['G_DY']["controller_path"].'/'.$__controller.".php");
8.      if(!is_object($handle_controller) || !method_exists($handle_controller$__action)){
9.          syError('route Error');
10.          exit;
11.      }
12.      $handle_controller->$__action();
13.      if(FALSE != $GLOBALS['G_DY']['view']['auto_display']){
14.          $__tplname $__controller.$GLOBALS['G_DY']['view']['auto_display_sep'].
15.                  $__action.$GLOBALS['G_DY']['view']['auto_display_suffix']; 
16.          $handle_controller->auto_display($__tplname);
17.      }
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();