SELECT lg.id, lg.heim, lg.gast, lg.mdate, lg.user, lu.admin, lu.published as userpublished, lg.checked_out
FROM #__livescore_games AS lg
LEFT JOIN #__livescore_user AS lu ON lu.kundennr = lg.kundennr AND lu.user = 0 AND lu.published = 1
WHERE lg.mdate >= NOW()
AND lg.finish=0
ORDER BY lg.mdate ASC