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
  • 1
    Which error does it produce in mysql_query? Commented Jul 20, 2011 at 12:34

1 Answer 1

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

You have double quotes in your query text.

Make sure they are properly escaped in the PHP string which is the argument to mysql_query.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.