MySQL Forums
Forum List  »  Newbie

geting random results from a table
Posted by: ocj
Date: June 30, 2005 03:05PM

Hi there,

i'm trying to get random results from a table.

The goal is to get a new headline everytime the page is loaded (or reloaded).

The table named articles has the following fields:
headline - self explained
sumary - a brief description of the headline
area - which is a number from 1 to 9
date - the date (YYYY-MM-DD) when the article was posted

I can do that with simple arrays using the shuffle () command but it's not working with an associative array from a query result.

Can anybody help me? Oh by the way i'm using Apache 1.3.31, PHP 4.3.0, MySQL 3.23 and Win2K.

Thanks

Options: ReplyQuote


Subject
Written By
Posted
geting random results from a table
ocj
June 30, 2005 03:05PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.