select t1.*
from bbs_product as t1, bbs_category as t2
where
(((t1.product_name_de like '%13"%') or
(t1.sku_number like '%13"%') or
(t1.description like '%13"%')) and
((t1.product_name_de like '%Laptoptasche%') or
(t1.sku_number like '%Laptoptasche%') or
(t1.description like '%Laptoptasche%')) and
((t1.product_name_de like '%im%') or
(t1.sku_number like '%im%') or
(t1.description like '%im%')) and
((t1.product_name_de like '%Buchdesign%') or
(t1.sku_number like '%Buchdesign%') or
(t1.description like '%Buchdesign%'))) and
(t1.category_id=t2.id and t2.status=1) and
t1.status=1 and
t1.discontinued='no' and
t1.is_secret='n'
答案 0 :(得分:4)
t1.sku_number like '%13"%') or
(t1.description like '%13"%')) and
您的查询文字中有双引号。
确保它们在PHP
字符串中正确转义,该字符串是mysql_query
的参数。