SELECT * FROM appdata WHERE id = '' ORDER BY id LIMIT 1
執行錯誤: MySQL server has gone away
- /home/codes/webcode/xmgbuy.com/SpeedPHP/Drivers/mysql.php on line 62
57.
{
58.
$this->arrSql[] = $sql;
59.
if( $result = mysql_query($sql, $this->conn) ){
60.
return $result;
61.
}else{
62.
63.
spError("{$sql}<br />執行錯誤: " . mysql_error());
}
64.
}
65.
66.
/**
67.
* 返回影響行數
- /home/codes/webcode/xmgbuy.com/SpeedPHP/Drivers/mysql.php on line 26
21.
*
22.
* @param sql 執行的SQL語句
23.
*/
24.
public function getArray($sql)
25.
{
26.
27.
if( ! $result = $this->exec($sql) )return array();
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);
- /home/codes/webcode/xmgbuy.com/SpeedPHP/Core/spModel.php on line 103
98.
}else{
99.
$sort = "ORDER BY {$this->pk}";
100.
}
101.
$sql = "SELECT {$fields} FROM {$this->tbl_name} {$where} {$sort}";
102.
if(null != $limit)$sql = $this->_db->setlimit($sql, $limit);
103.
104.
return $this->_db->getArray($sql);
}
105.
/**
106.
* 過濾轉義字符
107.
*
108.
* @param value 需要進行過濾的值
- /home/codes/webcode/xmgbuy.com/SpeedPHP/Core/spModel.php on line 65
60.
* @param sort 排序,等同于“ORDER BY ”
61.
* @param fields 返回的字段范圍,默認為返回全部字段的值
62.
*/
63.
public function find($conditions = null, $sort = null, $fields = null)
64.
{
65.
66.
if( $record = $this->findAll($conditions, $sort, $fields, 1) ){
return array_pop($record);
67.
}else{
68.
return FALSE;
69.
}
70.
}
- /home/codes/webcode/xmgbuy.com/include/shoppingcart.php on line 9
4.
$buydataarrays = explode(",",$this->buydata);
5.
$appdataObj = spClass("lib_appdata"); // 分類
6.
$total = 0;
7.
foreach ($buydataarrays as $value) {
8.
$conditions = array( 'id' => $value );
9.
10.
$Item = $appdataObj->find($conditions);
$total = $total+$Item['prices'];
11.
}
12.
$this->buydatanum = count($buydataarrays)-1;
13.
$this->total = $total;
14.
// 購物車
- /home/codes/webcode/xmgbuy.com/controller/tplbasis.php on line 459
454.
//dump($this->run_pluginobj);
455.
$this->dep_pl_model = "0"; // 系統插件鉤子分布查看 1=打開,0=關閉
456.
// -------------- 插件模式(2014-4-5增加) end --------------------
457.
458.
if(file_exists("include/shoppingcart.php")){
459.
460.
require("include/shoppingcart.php"); //引入數據庫
}
461.
462.
// 列表
463.
$lib_cate = spClass("lib_cate"); // 分類
464.
$cate_list = $lib_cate->getTyCataList();
- /home/codes/webcode/xmgbuy.com/SpeedPHP/spFunctions.php on line 149
144.
}
145.
}
146.
if(FALSE != $has_define){
147.
$argString = '';$comma = '';
148.
if(null != $args)for ($i = 0; $i < count($args); $i ++) { $argString .= $comma . "\$args[$i]"; $comma = ', '; }
149.
150.
eval("\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name($argString);");
return $GLOBALS['G_SP']["inst_class"][$class_name];
151.
}
152.
spError($class_name."類定義不存在,請檢查。");
153.
}
154.
- /home/codes/webcode/xmgbuy.com/SpeedPHP/spFunctions.php on line 14
9.
function spRun(){
10.
GLOBAL $__controller, $__action;
11.
// 對路由進行自動執行相關操作
12.
spLaunch("router_prefilter");
13.
// 對將要訪問的控制器類進行實例化
14.
15.
$handle_controller = spClass($__controller, null, $GLOBALS['G_SP']["controller_path"].'/'.$__controller.".php");
// 調用控制器出錯將調用路由錯誤處理函數
16.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
17.
eval($GLOBALS['G_SP']["dispatcher_error"]);
18.
exit;
19.
}
- /home/codes/webcode/xmgbuy.com/index.php on line 58
53.
),
54.
)
55.
);
56.
require(SP_PATH."/SpeedPHP.php");
57.
import(APP_PATH.'/controller/tplbasis.php'); // 需要先載入top控制器父類
58.
spRun();