select * from dy_message where isshow='1' order by orders desc,addtime desc,id desc limit -1,1
执行错误: 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 '-1,1' 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);
184.      <?php $ursx=$_SERVER['REQUEST_URI'];
185.        $zi=substr($ursx,strripos($ursx,'-')+1);
186.        $zi=substr($zi,0,strrpos($zi,'.'));
187.        $num=$zi-1;
188.      ?>
189.      <?php $tablev=syClass("syModel")->findSql("select * from dy_message where  isshow='1'  order by orders desc,addtime desc,id desc limit $num,1");foreach($tablev as $v){?>
190.      <div class="neirong">
191.        <h3><?php echo newstr($v['title'],50?></h3>
192.        <p><strong><?php echo disablewords($v['user']) ?></strong><i> @ <?php echo date('Y-m-d H:i',$v['addtime']) ?></i></p>
193.        <span><?php echo disablewords($v['body']) ?></span>
194.      </div>
64.          if( $enable_gzip==){
65.              GLOBAL $__template_compression_level;
66.              $__template_compression_level=syExt('enable_gzip_level');
67.              ob_start('template_ob_gzip');
68.          }
69.          include $template_tpl;
70.      }
71.      
72.      private function template_html($content){
73.          preg_match_all('/\{include=\"(.*?)\"\}/si',$content,$i);
74.          foreach($i[0] as $k=>$v){
23.      {
24.          try {
25.                  $this->addfuncs();
26.                  $this->displayed TRUE;
27.                  if($GLOBALS['G_DY']['view']['debugging'] && SP_DEBUG)$this->engine->debugging TRUE;
28.                  $this->engine->display($tplname);
29.          } catch (Exception $e) {
30.              syError$GLOBALS['G_DY']['view']['engine_name']. ' Error: '.$e->getMessage() );
31.          }
32.      }
33. 
25. 
26.      public function display($tplname$output TRUE)
27.      {
28.          @ob_start();
29.          if(TRUE == $GLOBALS['G_DY']['view']['enabled']){
30.              $this->v->display($tplname);
31.          }else{
32.              extract($this->__template_vals);
33.              require($tplname);
34.          }
35.          if( TRUE != $output )return ob_get_clean();
109.          $type_pos=$this->sy_class_type->navi($tid);
110.          foreach($type_pos as $v){
111.              $d_pos=syDB('classtype')->find(array('tid'=>$v['tid']),null,'tid,molds,htmldir,htmlfile,mrank');
112.              $this->positions.='  &gt;  <a href="'.html_url('classtype',$d_pos).'">'.$v['classname'].'</a>';
113.          }
114.          $this->display('article/'.$t);
115.      }
116.      function hits(){
117.          if($this->syArgs('id')){
118.              syDB('article')->incrField(array('id'=>$this->syArgs('id')), 'hits');
119.              $hits=syDB('article')->find(array('id'=>$this->syArgs('id')),null,'hits');
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();