these examples all give a different article each time the page loads......
you need to have it choose the same consistently......... I'm a newbie and this is probably heaps lame...... but it will work
make a new table, call it day_article with the following fields
id (INT 5), article_id(INT 5), date
now you make todays date at the top of each page
$today=date(Ymh); //syntax might be wrong
$sql="SELECT * FROM day_article WHERE date='$today'";
$result=mysql_query($sql)or die('Could not get todays article sorry');
// grab the number of rows found
$num=mysql_num_rows($result);
// if the article hasn't been selected for today, go and get a random article and insert it into day_article
if($num==0)
{
$sql="SELECT article_id, article_id*0+rand() as random ORDER by random LIMIT 0,1";
$result=mysql_query($sql)or die('Could not fetch random article');
$myrow=mysql_fetch_array($result);
$article_id=$myrow["article_id"];
$sql="INSERT into day_article values('','$article_id','$today')";
$result=mysql_query($sql)or die('Could not insert article into todays list');
}
// now join the two to get one article out
$sql="SELECT day_article.article_id, articles.title, etc etc from day_article, articles WHERE date='$today' AND day_article.article_id = articles.article_id";
$result=mysql_query($sql)or die('Could not get todays article');
$myrow out your variables and you are away!
you can make a $sql to run to delete all day_articles listings older than today..... It is heaps round about way of doing it, and I'm sure there is a nifty way of getting one per day, but this will work because the first visitor of each day will set the random, and all other visitors will get that article until the date clocks over again.
if you find a better way let me know about it.