SELECT * FROM products WHERE product_id = 10 ORDER BY product_id 执行错误
- /www/wwwroot/kwiweb.com/JedooPHP/Drivers/sqlite.php on line 183
178.
179.
$result = $this->db->query($sql);
180.
181.
if($result===false)
182.
//echo "查询出错!{$sql}";
183.
184.
JError("{$sql} 执行错误");
185.
$this->lastResult = $result;
186.
return $result;
187.
}
188.
- /www/wwwroot/kwiweb.com/JedooPHP/Drivers/sqlite.php on line 62
57.
*/
58.
public function getArray($sql)
59.
{
60.
$this->arrSql[] = $sql;
61.
62.
63.
$result = $this->exec($sql);
//make sure the result is valid
64.
if($result=== false || $result===NULL)
65.
return NULL; // error
66.
if(!is_object($result)) // no rows returned
67.
return array();
- /www/wwwroot/kwiweb.com/JedooPHP/MVC/JModel.php on line 134
129.
}else{
130.
$sort = "ORDER BY {$this->pk}";
131.
}
132.
$sql = "SELECT {$fields} FROM {$this->tbl_name} {$where} {$sort}";
133.
if(null != $limit)$sql = $this->_db->setlimit($sql, $limit);
134.
135.
return $this->_db->getArray($sql);
}
136.
137.
/**
138.
* 过滤转义字符
139.
*
- /www/wwwroot/kwiweb.com/JedooPHP/MVC/JModel.php on line 104
99.
*
100.
* @param pkvalue 查找条件
101.
* @param fields 查询字段,默认为*
102.
*/
103.
public function get($pkvalue, $fields = null){
104.
105.
if( $record = $this->getAll(array($this->pk => $pkvalue), null, $fields, null, 1) ){
return array_pop($record);
106.
}
107.
else{
108.
return FALSE;
109.
}
- /www/wwwroot/kwiweb.com/modules/products/products.php on line 634
629.
*/
630.
function detailsAction($params) {
631.
$product_id = intval($params['product_id']);
632.
if($product_id) {
633.
$products = JLoadClass('products');
634.
635.
$product = $products->get($product_id);
if($product) {
636.
if($product['pictures']) {
637.
$product['pictures'] = explode(',', $product['pictures']);
638.
}
639.
- /www/wwwroot/kwiweb.com/modules/JCall.php on line 53
48.
if($module_handle->template_name) {
49.
$temp_template_name = $module_handle->template_name;
50.
unset($module_handle->template_name);
51.
}
52.
if(method_exists($module_handle, $actionFunc)){
53.
54.
$module_handle->$actionFunc($params);
if(FALSE != $GLOBALS['G_JCONFIG']['view']['auto_display']){
55.
if(isset($module_handle->template_name)) {
56.
if($module_handle->template_name != '') {
57.
$tpl = $module.$GLOBALS['G_JCONFIG']['view']['auto_display_sep'].
58.
$module_handle->template_name.$GLOBALS['G_JCONFIG']['view']['template_file_suffix']; // 拼装模板路径
- /www/wwwroot/kwiweb.com/tmp/fc0cd5f468a38b704f37876e70ac69a3a6a6ac65.file.products_show.tpl.php on line 128
123.
<div class="content_resize">
124.
<div class="mainbar">
125.
<div class="article">
126.
<h2><?php echo $_smarty_tpl->getVariable('products')->value['product_name'];?>
127.
</h2>
128.
129.
<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['JCall'][0][0]->__template_JCall(array('module'=>'products','action'=>'details','product_id'=>$_smarty_tpl->getVariable('products')->value['product_id']),$_smarty_tpl);?>
130.
</div>
131.
</div>
132.
<div class="sidebar"> <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['JCall'][0][0]->__template_JCall(array('module'=>'categories','action'=>'treelist','tpl'=>'titletreelist','category_id'=>$_smarty_tpl->getVariable('category')->value['category_id'],'show_parent'=>true),$_smarty_tpl);?>
133.
</div>
- /www/wwwroot/kwiweb.com/JedooPHP/Drivers/Smarty/sysplugins/smarty_internal_template.php on line 432
427.
$_smarty_tpl = $this;
428.
ob_start();
429.
if ($this->resource_object->isEvaluated) {
430.
eval("?>" . $this->compiled_template);
431.
} else {
432.
433.
include($this->getCompiledFilepath ());
// check file dependencies at compiled code
434.
if ($this->smarty->compile_check) {
435.
if (!empty($this->properties['file_dependency'])) {
436.
$this->mustCompile = false;
437.
$resource_type = null;
- /www/wwwroot/kwiweb.com/JedooPHP/Drivers/Smarty/sysplugins/smarty_internal_template.php on line 567
562.
if ($this->isCached === null) {
563.
$this->isCached(false);
564.
}
565.
if (!$this->isCached) {
566.
// render template (not loaded and not in cache)
567.
568.
$this->renderTemplate();
}
569.
}
570.
$this->updateParentVariables();
571.
$this->isCached = null;
572.
return $this->rendered_content;
- /www/wwwroot/kwiweb.com/JedooPHP/Drivers/Smarty/Smarty.class.php on line 338
333.
}
334.
// return rendered template
335.
if ((!$this->caching || $_template->resource_object->isEvaluated) && (isset($this->autoload_filters['output']) || isset($this->registered_filters['output']))) {
336.
$_output = Smarty_Internal_Filter_Handler::runFilter('output', $_template->getRenderedTemplate(), $_template);
337.
} else {
338.
339.
$_output = $_template->getRenderedTemplate();
}
340.
$_template->rendered_content = null;
341.
if (isset($this->error_reporting)) {
342.
error_reporting($_smarty_old_error_level);
343.
}
- /www/wwwroot/kwiweb.com/JedooPHP/Drivers/Smarty/Smarty.class.php on line 382
377.
* @param object $parent next higher level of Smarty variables
378.
*/
379.
public function display($template, $cache_id = null, $compile_id = null, $parent = null)
380.
{
381.
// display template
382.
383.
$this->fetch ($template, $cache_id, $compile_id, $parent, true);
}
384.
385.
/**
386.
* test if cache i valid
387.
*
- /www/wwwroot/kwiweb.com/JedooPHP/MVC/JView.php on line 56
51.
{
52.
try {
53.
$this->addfuncs();
54.
$this->displayed = TRUE;
55.
if($GLOBALS['G_JCONFIG']['view']['debugging'] && debugMode)$this->engine->debugging = TRUE;
56.
57.
$this->engine->display($tplname);
} catch (Exception $e) {
58.
JError( $GLOBALS['G_JCONFIG']['view']['engine_name']. ' Error: '.$e->getMessage() );
59.
}
60.
}
61.
- /www/wwwroot/kwiweb.com/JedooPHP/MVC/JController.php on line 154
149.
*/
150.
public function display($tplname, $output = TRUE)
151.
{
152.
@ob_start();
153.
if(TRUE == $GLOBALS['G_JCONFIG']['view']['enabled']){
154.
155.
$this->v->display($tplname);
}else{
156.
extract($this->__template_vals);
157.
require($tplname);
158.
}
159.
if( TRUE != $output )return ob_get_clean();
- /www/wwwroot/kwiweb.com/modules/moduleController.php on line 102
97.
$tplfile = str_replace($GLOBALS['G_JCONFIG']['view']['template_file_suffix'], '_' . $this->getLang() . $GLOBALS['G_JCONFIG']['view']['template_file_suffix'], $tplname);
98.
if($this->v->engine->templateExists($tplfile)) {
99.
$this->display($tplfile);
100.
}
101.
else if($this->v->engine->templateExists($tplname)) {
102.
103.
$this->display($tplname);
}
104.
}
105.
}
106.
}
107.
- /www/wwwroot/kwiweb.com/JedooPHP/JFunctions.php on line 58
53.
else {
54.
$__tplname = $__controller.$GLOBALS['G_JCONFIG']['view']['auto_display_sep'].
55.
$__action.$GLOBALS['G_JCONFIG']['view']['template_file_suffix']; // 拼装模板路径
56.
}
57.
if($__tplname) {
58.
59.
$__handle_controller->auto_display($__tplname);
}
60.
}
61.
62.
// 对路由进行后续相关操作
63.
JInject("router_postfilter");
- /www/wwwroot/kwiweb.com/index.php on line 67
62.
if(count($server_info) > 1) {
63.
$server_domain = $server_info[count($server_info)-2];
64.
define('DOMAIN', $server_domain);
65.
}
66.
67.
68.
JStart();
?>