2011-07-20 48 views
1
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' 
+1

它在'mysql_query'中產生了哪個錯誤? – Quassnoi

+1

請發佈您的PHP代碼 – dknaack

回答

4
t1.sku_number like '%13"%') or 
(t1.description like '%13"%')) and 

您的查詢文本雙引號。

確保它們正確地在PHP字符串中跳過,該字符串是mysql_query的參數。

相關問題