I have a question. I have a query that calculates how many days until the next Grand Prix event in a list. Then I use the offset, if the event goes to 0 days or negative, I actually want to automatically go to the next positive number. I calculate Timeto between datetime and curdate in a table.
SELECT gp_naam, VT1, VT2, VT3, kwalificatie, race, image, CURDATE(), DATEDIFF(VT1, CURDATE()) AS Tijdtot FROM grand prix ORDER BY Tijdtot ASC LIMIT 1 OFFSET 1
I've tried everything and I think I need to do something with the WHERE Timeto >0 but it won't accept it and causes an error. Does anyone know how I can solve this problem? Thanks in advance for your help and comments
You can use a similar method to get the countdown: