Exception: FLEA_Db_Exception_SqlQuery
Message: SQL Error Message: "MySQL server has gone away"
SQL : "SELECT `602195132_columns`.* FROM `602195132_columns` WHERE `602195132_columns`.`lang` = 'en' AND `602195132_columns`.`col_key` = 'product' ORDER BY sort_id ASC, col_id ASc LIMIT 1"
SQL Error code: "7335941".
Filename: /www/web/ten-print_com/public_html/libs/FLEA/FLEA/Db/Driver/Mysql.php [187]
#10 FLEA_Db_Driver_Mysql::execute('SELECT `602195132_columns` ...')
ARGS:
Array
(
[0] => SELECT `602195132_columns`.* FROM `602195132_columns` WHERE `602195132_columns`.`lang` = 'en' AND `602195132_columns`.`col_key` = 'product' ORDER BY sort_id ASC, col_id ASc LIMIT 1
)
SOURCE CODE:
| 177 |
if (!is_null($offset)) {
|
| 178 |
$sql .= " LIMIT " . (int)$offset;
|
| 179 |
if (!is_null($length)) {
|
| 180 |
$sql .= ', ' . (int)$length;
|
| 181 |
} else {
|
| 182 |
$sql .= ', 4294967294';
|
| 183 |
}
|
| 184 |
} elseif (!is_null($length)) {
|
| 185 |
$sql .= " LIMIT " . (int)$length;
|
| 186 |
}
|
| 187 |
return $this->execute($sql);
|
| 188 |
}
|
| 189 |
|
| 190 |
function metaColumns($table)
|
| 191 |
{
|
| 192 |
/**
|
| 193 |
* C CHAR 或 VARCHAR 类型字段
|
| 194 |
* X TEXT 或 CLOB 类型字段
|
| 195 |
* B 二进制数据(BLOB)
|
| 196 |
* N 数值或者浮点数
|
| 197 |
* D 日期
|
Filename: /www/web/ten-print_com/public_html/libs/FLEA/FLEA/Db/TableDataGateway.php [456]
#9 FLEA_Db_Driver_Mysql::selectLimit('SELECT `602195132_columns` ...', 1, )
ARGS:
Array
(
[0] => SELECT `602195132_columns`.* FROM `602195132_columns` WHERE `602195132_columns`.`lang` = 'en' AND `602195132_columns`.`col_key` = 'product' ORDER BY sort_id ASC, col_id ASc
[1] => 1
[2] =>
)
SOURCE CODE:
| 446 |
$fields = $this->dbo->qfields($fields, $this->fullTableName, $this->schema);
|
| 447 |
if ($enableLinks) {
|
| 448 |
// 当有关联需要处理时,必须获得主表的主键字段值
|
| 449 |
$sql = "SELECT {$distinct} {$this->qpka}, {$fields} FROM {$this->qtableName} {$whereby} {$sortby}";
|
| 450 |
} else {
|
| 451 |
$sql = "SELECT {$distinct} {$fields} FROM {$this->qtableName} {$whereby} {$sortby}";
|
| 452 |
}
|
| 453 |
$GLOBALS['sql'][] = $sql;
|
| 454 |
// 根据 $length 和 $offset 参数决定是否使用限定结果集的查询
|
| 455 |
if (null !== $length || null !== $offset) {
|
| 456 |
$result = $this->dbo->selectLimit($sql, $length, $offset);
|
| 457 |
} else {
|
| 458 |
$result = $this->dbo->execute($sql);
|
| 459 |
}
|
| 460 |
|
| 461 |
if ($enableLinks) {
|
| 462 |
/**
|
| 463 |
* 查询时同时将主键值单独提取出来,
|
| 464 |
* 并且准备一个以主键值为键名的二维数组用于关联数据的装配
|
| 465 |
*/
|
| 466 |
$pkvs = array();
|
Filename: /www/web/ten-print_com/public_html/libs/FLEA/FLEA/Db/TableDataGateway.php [408]
#8 FLEA_Db_TableDataGateway::findAll(array(2), 'sort_id ASC, col_id ASc', 1, '*', 1)
ARGS:
Array
(
[0] => Array
(
[0] => Array
(
[0] => lang
[1] => en
)
[1] => Array
(
[0] => col_key
[1] => product
)
)
[1] => sort_id ASC, col_id ASc
[2] => 1
[3] => *
[4] => 1
)
SOURCE CODE:
| 398 |
*
|
| 399 |
* @param mixed $conditions
|
| 400 |
* @param string $sort
|
| 401 |
* @param mixed $fields
|
| 402 |
* @param mixed $queryLinks
|
| 403 |
*
|
| 404 |
* @return array
|
| 405 |
*/
|
| 406 |
function & find($conditions, $sort = null, $fields = '*', $queryLinks = true)
|
| 407 |
{
|
| 408 |
$rowset =& $this->findAll($conditions, $sort, 1, $fields, $queryLinks);
|
| 409 |
if (is_array($rowset)) {
|
| 410 |
$row = reset($rowset);
|
| 411 |
} else {
|
| 412 |
$row = false;
|
| 413 |
}
|
| 414 |
unset($rowset);
|
| 415 |
return $row;
|
| 416 |
}
|
| 417 |
|
| 418 |
/**
|
Filename: /www/web/ten-print_com/public_html/apps/common/Model/Columns.php [78]
#7 FLEA_Db_TableDataGateway::find(array(2), 'sort_id ASC, col_id ASc', '*')
ARGS:
Array
(
[0] => Array
(
[0] => Array
(
[0] => lang
[1] => en
)
[1] => Array
(
[0] => col_key
[1] => product
)
)
[1] => sort_id ASC, col_id ASc
[2] => *
)
SOURCE CODE:
| 68 |
/**
|
| 69 |
* 读出数据
|
| 70 |
*/
|
| 71 |
$column = $this->find(
|
| 72 |
array(
|
| 73 |
array('lang', getLanguage()),
|
| 74 |
array('col_key', $colKey)
|
| 75 |
),
|
| 76 |
$orderby,
|
| 77 |
$fields
|
| 78 |
);
|
| 79 |
|
| 80 |
return $column;
|
| 81 |
|
| 82 |
}
|
| 83 |
|
| 84 |
/**
|
| 85 |
* 获取栏目树
|
| 86 |
*
|
| 87 |
* @param string $col_key
|
| 88 |
* @param string $fields
|
Filename: /www/web/ten-print_com/public_html/apps/front/Controller/Product.php [54]
#6 Model_Columns::getColumnByKey('product')
ARGS:
Array
(
[0] => product
)
SOURCE CODE:
| 44 |
*/
|
| 45 |
parent::Controller_Base();
|
| 46 |
/**
|
| 47 |
* 实例化数据装载器
|
| 48 |
*/
|
| 49 |
|
| 50 |
$this->proModel =& FLEA::getSingleton('Model_Products');
|
| 51 |
$this->cateModel =& FLEA::getSingleton('Model_Categories');
|
| 52 |
|
| 53 |
$this->col_key = $_GET['col_key']?$_GET['col_key']:'product';
|
| 54 |
$this->column = $this->colModel->getColumnByKey($this->col_key);
|
| 55 |
|
| 56 |
}
|
| 57 |
/**
|
| 58 |
* 产品中心视图
|
| 59 |
*
|
| 60 |
* @access public
|
| 61 |
* @return void
|
| 62 |
*/
|
| 63 |
function actionIndex($extWhere = null,$config=array())
|
| 64 |
{
|
Filename: /www/web/ten-print_com/public_html/libs/FLEA/FLEA/Dispatcher/Simple.php [106]
#5 Controller_Product::__construct('product')
ARGS:
Array
(
[0] => product
)
SOURCE CODE:
| 96 |
|
| 97 |
$controller = null;
|
| 98 |
$controllerClassFilename = null;
|
| 99 |
do {
|
| 100 |
// 载入控制对应的类定义
|
| 101 |
if (!$this->_loadController($controllerClass)) { break; }
|
| 102 |
|
| 103 |
// 构造控制器对象
|
| 104 |
FLEA::setAppInf('FLEA.internal.currentControllerName', $controllerName);
|
| 105 |
FLEA::setAppInf('FLEA.internal.currentActionName', $actionName);
|
| 106 |
$controller =& new $controllerClass($controllerName);
|
| 107 |
if (!method_exists($controller, $actionMethod)) { break; }
|
| 108 |
if (method_exists($controller, '__setController')) {
|
| 109 |
$controller->__setController($controllerName, $actionName);
|
| 110 |
}
|
| 111 |
if (method_exists($controller, '__setDispatcher')) {
|
| 112 |
$controller->__setDispatcher($this);
|
| 113 |
}
|
| 114 |
|
| 115 |
// 调用 _beforeExecute() 方法
|
| 116 |
if (method_exists($controller, '_beforeExecute')) {
|
Filename: /www/web/ten-print_com/public_html/libs/FLEA/FLEA/Dispatcher/Simple.php [77]
#4 FLEA_Dispatcher_Simple::_executeAction('product', 'index', 'Controller_Product')
ARGS:
Array
(
[0] => product
[1] => index
[2] => Controller_Product
)
SOURCE CODE:
| 67 |
|
| 68 |
/**
|
| 69 |
* 从请求中分析 Controller、Action 和 Package 名字,然后执行指定的 Action 方法
|
| 70 |
*
|
| 71 |
* @return mixed
|
| 72 |
*/
|
| 73 |
function dispatching()
|
| 74 |
{
|
| 75 |
$controllerName = $this->getControllerName();
|
| 76 |
$actionName = $this->getActionName();
|
| 77 |
return $this->_executeAction($controllerName, $actionName, $this->getControllerClass($controllerName));
|
| 78 |
}
|
| 79 |
|
| 80 |
/**
|
| 81 |
* 执行指定的 Action 方法
|
| 82 |
*
|
| 83 |
* @param string $controllerName
|
| 84 |
* @param string $actionName
|
| 85 |
* @param string $controllerClass
|
| 86 |
*
|
| 87 |
* @return mixed
|
Filename: /www/web/ten-print_com/public_html/libs/FLEA/FLEA.php [816]
#3 FLEA_Dispatcher_Simple::dispatching()
ARGS:
Array
(
)
SOURCE CODE:
| 806 |
require_once($MVCPackageFilename);
|
| 807 |
}
|
| 808 |
FLEA::init();
|
| 809 |
|
| 810 |
// 载入调度器并转发请求到控制器
|
| 811 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 812 |
FLEA::loadClass($dispatcherClass);
|
| 813 |
|
| 814 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 815 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 816 |
$dispatcher->dispatching();
|
| 817 |
}
|
| 818 |
|
| 819 |
/**
|
| 820 |
* 准备运行环境
|
| 821 |
*
|
| 822 |
* @param boolean $loadMVC
|
| 823 |
*/
|
| 824 |
function init($loadMVC = false)
|
| 825 |
{
|
| 826 |
static $firstTime = true;
|
Filename: /www/web/ten-print_com/public_html/apps/application.php [80]
#2 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 70 |
return new application($app);
|
| 71 |
|
| 72 |
}
|
| 73 |
|
| 74 |
/**
|
| 75 |
* 运行框架
|
| 76 |
*
|
| 77 |
*/
|
| 78 |
function run()
|
| 79 |
{
|
| 80 |
FLEA::runMVC();
|
| 81 |
|
| 82 |
|
| 83 |
}
|
| 84 |
}
|
| 85 |
|
| 86 |
/**
|
| 87 |
* 超时操作句柄
|
| 88 |
*
|
| 89 |
* @access public
|
| 90 |
* @return void
|
Filename: /www/web/ten-print_com/public_html/index.php [27]
#1 application::run()
ARGS:
Array
(
)
SOURCE CODE:
| 17 |
/**
|
| 18 |
* 载入应用入口
|
| 19 |
*/
|
| 20 |
require_once './apps/application.php';
|
| 21 |
/**
|
| 22 |
* 运行应用
|
| 23 |
*/
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
application::factory('front')->run();
|
| 28 |
|
| 29 |
|