Jump to content

Recommended Posts

Hey guys

 

Just wanna get some thoughts on how to approach a small problem. I've developed a section on my website where i can enter gigs in an entry from and they get displayed on 5 different pages, (5 different cities) When you enter the gig or event you have to enter a date for it, this is in the standard mysql date format yyyy-mm-dd. I then display the listings in date ascending order etc. Is there a way of building a routine that deletes from the mysql db, any entires older than the current date? Either that or make it not pull entries from the db that are older than the current date. IE can the DATE fromat of a mysql db be compared to the TIME function in php?

 

Here is the code for pulling the entries, very simple:

 

$query = "SELECT * FROM events WHERE town='colchester' ORDER BY date ASC";

Link to comment
https://forums.phpfreaks.com/topic/146686-deleting-old-database-entires/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.