Database SQL: "SELECT goods_id, cate_id, brand_id, goods_name, measure, area_id, dist_id, address, original_price, goods_brief, now_price, newarrival , bargain,recommend, goods_image, tpyid, star, created_date FROM `vd_goods` WHERE status = 1 and seller_id = 1 AND (cate_id = :cate OR cate_id IN (SELECT cate_id FROM vd_goods_cate WHERE parent_id = :cate)) ORDER BY stock_qty DESC,IF(star=2,1,0) DESC,sorts DESC,goods_id DESC LIMIT 9960,20", ErrorInfo: Sort aborted: Query execution was interrupted

338.          {
339.              foreach($params as $k=>&$v$sth->bindParam($k$v);
340.          }
341.          if($sth->execute()) return $readonly $sth->fetchAll(PDO::FETCH_ASSOC) : $sth->rowCount();
342.          $err $sth->errorInfo();
343.          err('Database SQL: "' $sql'", ErrorInfo: '$err[2], 1);
344.      }
345.      
346.      public function db_instance($db_config$db_config_key$force_replace FALSE)
347.      {
348.          if($force_replace || empty($GLOBALS['instance']['mysql'][$db_config_key]))
317.              return empty($this->page) ? '' " LIMIT {$this->page['offset']},{$this->page['limit']}";
318.          }
319.          return $limit ' LIMIT '.$limit '';
320.      }
321.      
322.      public function query($sql$params = array()){return $this->execute($sql$paramstrue);}
323.      
324.      public function execute($sql$params = array(), $readonly FALSE)
325.      {
326.          $this->sql[] = $sql;
327.          if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE']))
188.                  $sort 'goods_id DESC';
189.              }
190. 
191.              $fields 'goods_id, cate_id, brand_id, goods_name, measure, area_id, dist_id, address, original_price, goods_brief, now_price, newarrival , bargain,recommend, goods_image, tpyid, star, created_date  ';
192.              $sql "SELECT {$fields} FROM {$this->table_name} {$where} ORDER BY stock_qty DESC,IF(star=2,1,0) DESC,sorts DESC,{$sort} {$limit}";
193.              return $this->query($sql$binds);
194.          }
195.          
196.          return null;
197.      }
198.      
53.          
54.          $this->minmxprice minmxprice();
55.          
56.          $goods_model = new goods_model();
57.          
58.          $this->goods_list $goods_model->find_goods($conditions, array(request('page'1), $GLOBALS['cfg']['cate_goods_per_num']));
59.          
60.          $this->recommend $vcache->goods_model('find_goods', array(array('recommend' => 1), 10), $GLOBALS['cfg']['data_cache_lifetime']);
61.          
62.          $this->goods_paging $goods_model->page;
63.          
82.  $action_name 'action_'.$__action;
83.  if(!class_exists($controller_nametrue)) err("Err: Controller '$controller_name' is not exists!");
84.  $controller_obj = new $controller_name();
85.  if(!method_exists($controller_obj$action_name)) err("Err: Method '$action_name' of '$controller_name' is not exists!");
86. 
87.  $controller_obj->$action_name();
88. 
89.  function url($c 'main'$a 'index'$param = array()) {
90.      if(is_array($c)) {
91.          $param $c;
92.          if(isset($param['m'])) $m $param['m']; unset($param['m']);
1.  <?php
2.  define('APP_DIR'realpath('./'));
3.  defined('DS') or define('DS'DIRECTORY_SEPARATOR);
4.  define('INCL_DIR'APP_DIR.DS.'protected'.DS.'include');
5.  require(INCL_DIR.DS.'core.php');