Re: RE: why does it not work (fwd)
| From: | Adrian D'Costa | Date: | Tue, 22 May 2001 07:06:35 +0000 |
| Subject: | Re: RE: why does it not work (fwd) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53817@lists.php.net to get a copy of this message | ||
On 22 May 2001, Chris Searle wrote:
> >>>>> "Adrian" == Adrian D'Costa <adrian@pcsadvt.com>
> >>>>> writes:
>
> Adrian> // sql statement $searchStmt = "select special.contid,
> Adrian> special.cityid, special.curr1, special.catalogo,
> Adrian> special.hf, special.curr2, special.vitofferta, special.fh,
> Adrian> special.club, special.stars, city.city,RAND as r from
> Adrian> special,city where DATE_SUB(special.periodo, INTERVAL 3
> Adrian> DAY) >'$tdate' and city.id=special.cityid order by r limit
> Adrian> 1" ;
>
> So far as I know - the RAND function was introduced in 3.23 - at least
> the order by RAND functionality.
>
> >From the docs:
>
> In MySQL Version 3.23, you can, however, do: SELECT * FROM table_name
> ORDER BY RAND()
If I cut and past this in the online mysql it works. It display the
records randomly, why not in php?
Adrian