MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 11th, 2000, 07:50 PM
billy10k billy10k is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 12 billy10k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hey, I'm pretty new to sql.. I'm helping with html and sql for a site (audioglobe.com), and I was wondering if anyone had a good way to do an "Artist of the day" type of thing (it's a music web site). For now we are just going to have it be completely random, and change each day at midnight. Repeats are not a concern because a) we already have about 120 artists and b) within a few months it will not be random anymore, we will actually be picking them ourselves and writing small reviews and interviewing the artists (through email), etc...

I'm just not sure how to do the date stuff.. have it change each day at midnight.. Any help would be greatly appreciated, thanks!

Reply With Quote
  #2  
Old July 11th, 2000, 11:08 PM
supine supine is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 35 supine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Try writing a script that is run by cron at midnight that alters the "artist of the day" link and details.

If your write it in perl, just call it directly. If you write it in php, call it like this:
lynx -dump http://yoururl.com/script.php>>/dev/null

Reply With Quote
  #3  
Old July 12th, 2000, 01:34 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I thought of using cron earlier but billy doesn't really need to.
No database is being used in this example, I hope you get the logic of it.

1) Prepare a text file that should contain two lines: (this is for initial only)
07-11-2000
artist_num

2) Everytime your script is called, first read the text file above, then check the current date, if the date matches, keep this text file untouched and continue.

3) If the date doesn't match, update the date line and artist_num's line.

4) Open and read that text file again and get the appropriate artist to be displayed.

[This message has been edited by freebsd (edited July 12, 2000).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > "something" of the day... ideas?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway