$smarty->display放在那边都会出现布局乱
Jun 13, 2016 pm 12:20 PM
$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 指令没有结束!
贴出相关代码看看

인기 기사

인기 기사

뜨거운 기사 태그

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











데이터베이스에서 Java 열거 유형의 애플리케이션 시나리오는 무엇입니까?

PHP를 사용하여 MySQL 테이블에 데이터를 삽입하는 방법은 무엇입니까?

MySQL 8.4에서 mysql_native_password가 로드되지 않음 오류를 수정하는 방법
