SELECT tbIgre.*,
days_to_go AS leftTime,
DATE_FORMAT(datum_vnosa,'%e.%c.%y') as vnos,
COUNT(tbKomentarji.id) AS komentarjev
FROM nageigre__igre AS tbIgre
LEFT JOIN nageigre__komentarji AS tbKomentarji ON tbIgre.id=tbKomentarji.igraID
WHERE tip LIKE '%fitnes%' OR tip LIKE '%ženske%' OR tip LIKE '%nagradne igre%' OR tip LIKE '%vstopnice%' OR tip LIKE '%glasovanje%' OR tip LIKE '%žoge%' OR tip LIKE '%Kino Šiška%' OR tip LIKE '%pohištvo%' OR tip LIKE '%izdelki%' OR tip LIKE '%ipod%' OR tip LIKE '%telefon%' OR tip LIKE '%iphone%' OR tip LIKE '%kino%' OR tip LIKE '%sobno kolo%' OR tip LIKE '%nlb%' OR tip LIKE '%nagradno glasovanje%' OR tip LIKE '%hrana%' OR tip LIKE '%50 cent%' OR tip LIKE '%moški%' OR tip LIKE '%popust%' OR tip LIKE '%zlatko%'
GROUP BY tbIgre.id
HAVING leftTime <= 1002
ORDER BY datum_vnosa DESC
--- Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_unicode_ci,COERCIBLE) for operation 'like'