[Gllug] Perl DBI question

Adrian McMenamin adrian at newgolddream.dyndns.info
Mon Oct 2 22:52:03 UTC 2006


On Mon, 2006-10-02 at 23:12 +0100, Adrian McMenamin wrote:
> On Mon, 2006-10-02 at 23:09 +0100, Ryan Cartwright wrote:
> 
> > 
> > Isn't this just a case of using rand[om] within your SQL?
> > 
> > SELECT * FROM TABLE1 ORDER BY RAND() LIMIT 1; -- MySQL
> > 
> > SELECT * FROM TABLE1 ORDER BY RANDOM() LIMIT 1; -- PostgreSQL
> Looks worth a try!
> 

It did work by the way, so thanks

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list