Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Can Links SQL act like a "Classified ADs System" with auto expiry check

Quote Reply
Can Links SQL act like a "Classified ADs System" with auto expiry check
Can Links do this, act like a classified ads system that will automatically remove ads after a selected number of days?


Leslie
Quote Reply
Re: Can Links SQL act like a "Classified ADs System" with auto expiry check In reply to
Have a look at http://www.gossamer-threads.com/...um9/HTML/000642.html

Hope that helps!


------------------
Robert Blackstone
Webmaster of Scato Search
www.scato.com
Quote Reply
Re: Can Links SQL act like a "Classified ADs System" with auto expiry check In reply to
You can set links up to do just about anything. If you have a field with the expire date, or the date of addition, and you know when you want it to expire, you can run a cron job such as:

DELETE FROM Links WHERE Expire_Date < Now()

If you wanted to put the add-date and expire based on a number of days in the future, you could do something like:

DELETE FROM Links WHERE ADDDATE(Add_Date, INTERVAL 30 DAY)< NOW()

In order to make this work, you might have to convert it all to UNIX_TIMESTAMP() so that you are dealing with a numerical value.

There are probably a dozen different ways to decide what links to get rid of, the point is that you _can_ do it.

You can manually expire from the Admin by running the script or from cron on a daily basis.