i have a question. I have a query that calculates how many days it is until the next grand_prix event in the list. I then work with offset and I actually want to automatically go to the next positive number if the event becomes 0 days or a negative number. i calculate the Timeto in the table between datetime and curdate.
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 already tried everything and I think I need to do something with WHERE Timeto >0 but it won't accept it and result in an error. does anyone know how i can solve this? thanks in advance for your help and input