时间:2021-07-01 10:21:17 帮助过:15人阅读
报错如下:
1054) Unknown column '$catid' in 'where clause'
SELECT * FROM ecm_gcategory Where cate_id=$catid ORDER BY cate_id
$sql_store = "SELECT * FROM ecm_gcategory Where cate_id=$catid ORDER BY cate_id";
双引号!
单引号里面的变量不能被解析,需用双引号括起来。或者改成下面这样:
$sql_store = 'SELECT * FROM ecm_gcategory Where cate_id='.$catid.' ORDER BY cate_id';