Records which contain an ampersand (&) are not returned by MySQL (connected to via PHP), but the same query works fine in phpMyAdmin. I am not sure if it is a collate/charset problem. Here is the sample query:
SELECT distinct(pcs.shop_name) AS shopName
FROM shops AS ps
LEFT JOIN category_shop AS cs
ON ps.shop_id = cs.shop_id
WHERE 1=1
AND (ps.shop_name LIKE '%P&G%')
AND ps.is_active!=2
ORDER BY ps.shop_display_name ASC
The shop_name I am trying to search for is P&G.
Try this (i guess You are using GET to submit a form if You have problem with ampersand):
on Your page for that field values (this means You call urlencode for every field value when generating form). Then after a GET is done, simply do:
Does this work for You?