SELECT sel.id, sel.company_id,sel.company, sbv.title FROM ( SELECT MAX(sbv.id) AS id, sbu.id AS company_id, sbu.company FROM smcontents_b_vacancy sbv INNER JOIN smcontents_b_user sbu ON sbv.user_id=sbu.id WHERE sbv.display=1 AND sbu.user_type=2 AND sbu.visible=1 AND (sbv.branch LIKE '%;17;%' or `branch` LIKE '17;%' or `branch` LIKE '%;17' or `branch`='17') AND sbu.company<>'Žðãàíèçàöèß' GROUP BY sbu.id, sbu.company ORDER BY RAND() LIMIT 5) as sel INNER JOIN smcontents_b_vacancy sbv ON sel.id=sbv.id WHERE sbv.id <> 81062
Table 'smcontents_b_vacancy' is marked as crashed and should be repaired