www.webdeveloper.com
Results 1 to 2 of 2

Thread: Suggestions to Display Random Text

  1. #1
    Join Date
    Jul 2006
    Posts
    1

    Question Suggestions to Display Random Text

    Hi ,

    I have a customer who wants to display "success stories" randomly on html pages. I was planning to store the text in a mySQL database and use PHP to display them. Does anyone have a better idea?

    Thanks

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    mysql has a RAND() function that can be used like this

    Code:
    select descript from table ORDER BY RAND() LIMIT 1;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles