select id, name, body, CONCAT("/content/pictures/literature/files/img_", id, "_0.", img) as image from literature_files where ((name LIKE '%Подольская%' AND name LIKE '%губерния%') OR (body LIKE '%Подольская%' AND body LIKE '%губерния%')) order by rand() limit 2