paul scott1234 Posted February 12, 2011 Share Posted February 12, 2011 Hi people,I have this piece of code below which returns a search using ajax. the probelm is i also need it to return the results from the PS_address company field. can any one help ? ive tried every thing. help $customers = Db::getInstance()->ExecuteS(' SELECT `id_customer`, `email`, CONCAT(`lastname`, \' \', `firstname`) as name FROM `'._DB_PREFIX_.'customer` WHERE email LIKE "%'.pSQL($filter).'%" '.(intval($filter) ? 'OR id_customer = '.intval($filter) : '').' OR CONCAT(`firstname`, \' \', `lastname`) LIKE "%'.pSQL($filter).'%" OR CONCAT(`lastname`, \' \', `firstname`) LIKE "%'.pSQL($filter).'%" ORDER BY CONCAT(`lastname`, \' \', `firstname`) ASC LIMIT 50'); Link to comment Share on other sites More sharing options...
Recommended Posts