I have displayed a certain amount of records on my site, how do i keep it up to date so that once a date passes; i am displaying events and dates; that one gets replaced with newer ones from the database. thanks!
I'm not sure what you are asking, but it sounds to me like you need to use a SELECT query that pulls from the database records that fall into a certain data window.
I'll need more details about what you want to do and with what you are trying to do it before I can answer further.
i am displaying events with dates on a website. I have limited how many records are to be displayed at once, i now want to know how i can keep these records up to date so that events that have passed do not show and are replaced with newer events from the database????
on your sql statement, query those "events" and "dates" that are greater than the current date and use ORDER BY ASC on the date/time event on your sql statement, then output records in your page.
can you give me an example of this, i have already got:
$query = "SELECT * FROM events ORDER BY Date"; date being my field and events being the table. Im not too sure how to do the greater than the current date thing.. thanks alot!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.