I want to show the following events for my fotball club. I want to limit the posts so that only one, for example, a-team match is shown, even if there is 5 matches in the DB.
I'm using this code:
SELECT * FROM almanacka WHERE date BETWEEN NOW() AND NOW() + INTERVAL 30 DAY GROUP BY IF(type is NULL, id, type) ORDER BY date ASC
I allso want that the game will dissapear when the value of the column 'endtime' has expired.
Please, any one know how to fix this???