קוד:
SELECT
`customer`.`id`, `customer`.`cat_level_1`, `customer`.`active`, `customer`.`country_id`, `customer`.`area_id`, `customer`.`city_id`, `customer_details`.`title` as name,
`customer_details`.`language_id`, `customer_details`.`image_1` as image, `customer_details`.`image_2` as image2, `customer_details`.`short_text` as short_text, `customer`.`link`,
localization_base.country as country,
loc_area.name as area,
loc_city.name as city
FROM
`customer`,
`customer_details`,
`localization_base`,
`localization_title` as loc_area,
`localization_title` as loc_city
WHERE `customer_details`.`customer_id` = `customer`.`id`
AND localization_base.id = customer.country_id
AND loc_area.localization_id = customer.area_id AND loc_area.language_id = 1
AND loc_city.localization_id = customer.city_id AND loc_city.language_id = 1
AND `customer`.`active` = 1 AND `customer`.`country_id` = 1
AND `customer_details`.`language_id` = '1'
AND `customer`.`id` IN (SELECT sub_cust.id
FROM `customer` as sub_cust
WHERE `customer_details`.`title` LIKE '%הר%' OR `customer_details`.`short_text` LIKE '%הר%' OR `customer_details`.`long_text` LIKE '%הר%')
LIMIT 6