You might try getting the random number before the query.
-Original Message-
From: Rich Gray [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 01, 2003 8:37 PM
To: Frank Keessen; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] RE: [PHP] Random not working?
> Hi All,
>
> I
March 02, 2003 2:36 AM
Subject: [PHP-DB] RE: [PHP] Random not working?
> > Hi All,
> >
> > I'm trying to get a random record each time this script runs;
> > Only it's giving me everytime the first record back.. No random at all..
> >
> > // gene
> Hi All,
>
> I'm trying to get a random record each time this script runs;
> Only it's giving me everytime the first record back.. No random at all..
>
> // generate and execute query
> $query = "SELECT stedenid, naamstad, stadomschrijvk FROM steden
> ORDER BY RAND() LIMIT 1";
> $result = mysql_qu
3 matches
Mail list logo