1:mysql id_goods=”和id_goods=0是一样的。会查询到id_goods = 0 的数据
2:tp 里面 where语句写 id_pa is null,在不同的php版本打印的sql不一样,会导致查询的数据不一样,就会导致程序有bug,很难排查
select * from product_image where id_goods = ” and id_pa =”
SELECT * FROM `product_image` WHERE ( id_goods = '' ) AND ( id_pa is null )
发表回复