当前位置:Gxlcms > PHP教程 > $smarty->display放在那边都会出现布局乱

$smarty->display放在那边都会出现布局乱

时间:2021-07-01 10:21:17 帮助过:6人阅读

$smarty->display放在那里都会出现布局乱
PHP编写网页,原本网页可以正常显示,但是之后再一个PHP是取数据库数据,然后传到另一个DWT,传值的方法是$smarty->assign和$smarty->display,但是这段代码放在PHP文件中间,则之后的数据读不出来,布局也乱了,将$smarty放到最后,数据是取出来但是布局还是乱了,怀疑是不是display传值问题。不管放在什么位置,都会显示下面这段话。
MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => select rc.recommend_type from `zaidiangou`.`ecs_category` as c left join `zaidiangou`.`ecs_cat_recommend` as rc on c.cat_id = rc.cat_id where c.cat_id= ) [2] => Array ( [error] => 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 '' at line 1 ) [3] => Array ( [errno] => 1064 ) )

------解决思路----------------------
mysql error 导致 php fatal error 后面的程序不执行了。
------解决思路----------------------
where c.cat_id= 等号后面是空的,语法还能通过吗
------解决思路----------------------
不是已经有了错误报告了吗?
MySQL server error report:
array (
0 =>
array (
'message' => 'MySQL Query Error',
),
1 =>
array (
'sql' => 'select rc.recommend_type from `zaidiangou`.`ecs_category` as c left join `zaidiangou`.`ecs_cat_recommend` as rc on c.cat_id = rc.cat_id where c.cat_id=',
),
2 =>
array (
'error' => '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 \'\' at line 1',
),
3 =>
array (
'errno' => '1064',
),
)
SQL 指令没有结束!
贴出相关代码看看

人气教程排行