• <tr id='NhCzjI'><strong id='NhCzjI'></strong><small id='NhCzjI'></small><button id='NhCzjI'></button><li id='NhCzjI'><noscript id='NhCzjI'><big id='NhCzjI'></big><dt id='NhCzjI'></dt></noscript></li></tr><ol id='NhCzjI'><option id='NhCzjI'><table id='NhCzjI'><blockquote id='NhCzjI'><tbody id='NhCzjI'></tbody></blockquote></table></option></ol><u id='NhCzjI'></u><kbd id='NhCzjI'><kbd id='NhCzjI'></kbd></kbd>

    <code id='NhCzjI'><strong id='NhCzjI'></strong></code>

    <fieldset id='NhCzjI'></fieldset>
          <span id='NhCzjI'></span>

              <ins id='NhCzjI'></ins>
              <acronym id='NhCzjI'><em id='NhCzjI'></em><td id='NhCzjI'><div id='NhCzjI'></div></td></acronym><address id='NhCzjI'><big id='NhCzjI'><big id='NhCzjI'></big><legend id='NhCzjI'></legend></big></address>

              <i id='NhCzjI'><div id='NhCzjI'><ins id='NhCzjI'></ins></div></i>
              <i id='NhCzjI'></i>
            1. <dl id='NhCzjI'></dl>
              1. <blockquote id='NhCzjI'><q id='NhCzjI'><noscript id='NhCzjI'></noscript><dt id='NhCzjI'></dt></q></blockquote><noframes id='NhCzjI'><i id='NhCzjI'></i>

                SELECT COUNT(article_id) AS SP_COUNTER FROM gsp_article WHERE category_id= or category_id in (1,2,23,66,88,102,103,108,210)
                执行错误: 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 'or category_id in (1,2,23,66,88,102,103,108,210)' at line 1

                57.      {
                58.          $this->arrSql[] = $sql;
                59.          if( $result mysql_query($sql$this->conn) ){
                60.              return $result;
                61.          }else{
                62.              spError("{$sql}<br />执行错误: " mysql_error());
                63.          }
                64.      }
                65.      
                66.      /**
                67.       返回影响行→数
                21.       
                22.       * @param sql  执行的SQL语句
                23.       */
                24.      public function getArray($sql)
                25.      {
                26.          if( ! $result $this->exec($sql) )return array();
                27.          if( ! mysql_num_rows($result) )return array();
                28.          $rows = array();
                29.          while($rows[] = mysql_fetch_array($result,MYSQL_ASSOC)){}
                30.          mysql_free_result($result);
                31.          array_pop($rows);
                290.              if(null != $conditions)$where "WHERE ".$conditions;
                291.          }
                292.          $this->pk=isset($this->pk)?$this->pk:"*";
                293.          $sql "SELECT COUNT({$this->pk}) AS SP_COUNTER FROM {$this->tbl_name} {$where}";
                294.          
                295.          $result $this->_db->getArray($sql);
                296.          return $result[0]['SP_COUNTER'];
                297.      }
                298. 
                299.      /**
                300.       魔术函数,执行模型扩展☉类的自动加载及使用
                473.          $pageSize $this->input_args[1];
                474.          @list($conditions$sort$fields ) = $func_args;
                475.          if('findSql'==$func_name){
                476.              $total_count array_poparray_pop$this->model_obj->findSql("SELECT COUNT({$this->model_obj->pk}) as sp_counter FROM ($conditions) sp_tmp_table_pager1") ) );
                477.          }else{
                478.              $total_count $this->model_obj->findCount($conditions);
                479.          }
                480.          if($total_count $pageSize){
                481.              $total_page ceil$total_count $pageSize );
                482.              $page min(intval(max($page1)), $total_count); // 对页码∞进行规范运算
                483.              $this->pageData = array(
                448.      /** 
                449.       魔术函数,支持多重函数式使用类的方法
                450.       */
                451.      public function __call($func_name$func_args){
                452.          if( ( 'findAll' == $func_name || 'findSql' == $func_name ) && != $this->input_args[0]){
                453.              return $this->runpager($func_name$func_args);
                454.          }elseif(method_exists($this,$func_name)){
                455.              return call_user_func_array(array($this$func_name), $func_args);
                456.          }else{
                457.              return call_user_func_array(array($this->model_obj$func_name), $func_args);
                458.          }
                60. 
                61.          /******************************************************************************************************/
                62.          
                63.          $condition=$category->getIds($cid);
                64.          
                65.          $this->articlelist=$article->spPager($this->spArgs('page',1),$pagesize)->findAll($condition,"adddate desc,article_id desc","article_id,article_title,article_content,adddate,viewnum,article_pic");
                66.          $this->pager=$article->spPager()->getPager();
                67.          if($this->pager)
                68.          {
                69.              import("page.php");
                70.              $page=new Page($this->pager["total_count"],$pagesize,$this->spArgs('page',1));
                60. 
                61.          /******************************************************************************************************/
                62.          
                63.          $condition=$category->getIds($cid);
                64.          
                65.          $this->articlelist=$article->spPager($this->spArgs('page',1),$pagesize)->findAll($condition,"adddate desc,article_id desc","article_id,article_title,article_content,adddate,viewnum,article_pic");
                66.          $this->pager=$article->spPager()->getPager();
                67.          if($this->pager)
                68.          {
                69.              import("page.php");
                70.              $page=new Page($this->pager["total_count"],$pagesize,$this->spArgs('page',1));
                16.      if(!is_object($handle_controller) || !method_exists($handle_controller$__action)){
                17.          eval($GLOBALS['G_SP']["dispatcher_error"]);
                18.          exit;
                19.      }
                20.      // 路由并执行用→户代码
                21.      $handle_controller->$__action();
                22.      // 控制器程序运行⊙完毕,进行模板的自动输出
                23.      if(FALSE != $GLOBALS['G_SP']['view']['auto_display']){
                24.          $__tplname $__controller.$GLOBALS['G_SP']['view']['auto_display_sep'].
                25.                  $__action.$GLOBALS['G_SP']['view']['auto_display_suffix']; // 拼装模板路径
                26.          $handle_controller->auto_display($__tplname);
                24.      ),
                25.  );
                26. 
                27.  require(SP_PATH."/SpeedPHP.php");
                28.  require(SP_PATH."/Extensions/cyFunctions.php");
                29.  spRun();
                30. 
                31.  ?>