select id, name, body, CONCAT("/content/pictures/literature/files/img_", id, "_0.", img) as image from literature_files where ((name LIKE '%Типы%' AND name LIKE '%Западной%' AND name LIKE '%Украины%') OR (body LIKE '%Типы%' AND body LIKE '%Западной%' AND body LIKE '%Украины%')) order by rand() limit 2