/* /store/goods_list.php */ select count( DISTINCT(c.goodsno) ) as cnt from breed_store_category a inner join breed_store_multicategory b on a.cateno=b.category_id inner join breed_store_goods c on b.goods_id=c.goodsno where a.lft between and and is_delete=0 and goods_display=0 and ( goods_sell_date = 0 or CURDATE() between goods_sell_start and goods_sell_end )


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 and is_delete=0 and goods_display=0 and ( goods_sell_date = 0 or CURDATE' at line 5