Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 06-15-2006, 04:18 PM PHP / MYSQL question
Novice Talker

Posts: 8
Trades: 0
Hey i have a question, i have a website where i have listings inserted into a database along with the time. How could i make it so the listings will automatically get deleted from the database after 60 days?
rjbrock is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-15-2006, 07:12 PM Re: PHP / MYSQL question
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
Change the page that displays the listings to check the dates before displaying them. If any are 60 days or older then delete them at that point. If no-one looks at the list for a few days after a listing turns 60 days old, it won't be deleted, but then no-one will notice since it will be deleted the first time someone loads the page again.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 06-15-2006, 08:25 PM Re: PHP / MYSQL question
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
You can do similiar to the same thing above as Oberon stated, but if you want to eleminate uneccessary tasks during a normal user request, you can setup a cron job that would execute in the non-peak times (middle of the night) to run a pre-made script.

This is handy if you are handeling bulk items to parse and you want to do later to improve php/mysql/server performance.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP / MYSQL question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11734 seconds with 12 queries