Jump to content


Photo

Help please...


  • Please log in to reply
1 reply to this topic

#1 stowell

stowell
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 26 August 2006 - 04:29 PM

Hi Guys,

Can someone help me? I have a table name messages column "msg_id,msg_name and msg_description this table have 72 data, I want this data to view one at the time ramdomly every 5 hours in a web page.

Thanks

#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 26 August 2006 - 04:54 PM

$query = "SELECT msg_id,msg_name, msg_description  FROM `table_name` ORDER BY RAND() LIMIT 0,1";


thats a query that will select a record at random but that 5 minutes u will need to refresh the page as php is server side so can't time and update dynamicaly or a less in a iframe or using AJAX

Regards
Liam
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users