Re: Selecting one random column from MySQL

From: Date: Wed, 18 Sep 2002 12:37:16 +0000
Subject: Re: Selecting one random column from MySQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21826@lists.php.net to get a copy of this message
Hello, Shoulder. You wrote 18 сентября 2002 г., 5:20:55: Do you mean random row? So, try this $query = "SELECT * FROM table ORDER BY RAND() LIMIT 1"; $result = mysql_query($query); etc... StSF> Hi all, StSF> How can I select one random column from a MySQL table? StSF> Thanks, Taj www.pskov.ru webmaster|programmer|DBA www.invest.pskov.ru www.education.pskov.ru -- Best Regards, Andrey mailto:andrey@pleskov.ru

« previous php.db (#21826) next »