SELECT SQL_CALC_FOUND_ROWS COUNT(results.c_1) as count, results.* FROM ( SELECT * FROM p_1 WHERE c_1 LIKE "%Matelas%" AND id!=23752 AND c_18 < 1597332011 UNION ALL SELECT * FROM p_1 WHERE c_1 LIKE "%Banquette%" AND id!=23752 AND c_18 < 1597332011 UNION ALL SELECT * FROM p_1 WHERE c_1 LIKE "%Clic%" AND id!=23752 AND c_18 < 1597332011 UNION ALL SELECT * FROM p_1 WHERE c_1 LIKE "%Clac%" AND id!=23752 AND c_18 < 1597332011 UNION ALL SELECT * FROM p_1 WHERE c_1 LIKE "%BULTEX%" AND id!=23752 AND c_18 < 1597332011 UNION ALL SELECT * FROM p_1 WHERE c_1 LIKE "%14%" AND id!=23752 AND c_18 < 1597332011 UNION ALL SELECT * FROM p_1 WHERE c_1 LIKE "%c%" AND id!=23752 AND c_18 < 1597332011 UNION ALL SELECT * FROM p_1 WHERE c_1 LIKE "%m%" AND id!=23752 AND c_18 < 1597332011 ) as results WHERE c_18 < 1597332011 GROUP BY results.id ORDER BY count DESC LIMIT 6
Got error 28 from storage engine