Discuz! Database Error

(1064) 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 'AND upid=0 order by orderid' at line 1
SELECT * FROM pre_prod_category where chid= AND upid=0 order by orderid

PHP Debug

No.FileLineCode
1prod.php65require_once(%s)
2source/module/prod/prod_brand.php31discuz_database::query(%s)
3source/class/discuz/discuz_database.php139db_driver_mysql->query(%s, false, false)
4source/class/db/db_driver_mysql.php152db_driver_mysql->halt(%s, %d, %s)
5source/class/db/db_driver_mysql.php223break()
www.linkconn.cn 已经将此出错信息详细记录, 由此给您带来的访问不便我们深感歉意.