Re: select the most repeated value in a field

From: Date: Thu, 24 May 2001 21:06:35 +0000
Subject: Re: select the most repeated value in a field
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-54186@lists.php.net to get a copy of this message
After I use that query, I got list of result group by DESC under variable name " firstchoice", how could I index this firstchoice variable so that I can take each individual result to display according to the page layout position? Jack jacky@activelifestyle.com "There is nothing more rewarding than reaching the goal you've set for yourself" ----- Original Message ----- From: George E. Papadakis <georgep@phaistosnetworks.gr> To: Jacky <jacky@activelifestyle.com>; <php-general@lists.php.net> Sent: Thursday, May 24, 2001 2:56 AM Subject: Re: [PHP] select the most repeated value in a field > select result,count(*) as cnt from table group by result order by cnt desc ; > > > ----- Original Message ----- > From: "Jacky" <jacky@activelifestyle.com> > To: <php-general@lists.php.net> > Sent: Thursday, May 24, 2001 10:02 PM > Subject: [PHP] select the most repeated value in a field > > > Hi people > How do i query to select the most repeated values in a field, say if I hacve > list of values as a,b,c,d,e to be submitted to a field call "result" in a > table. And I want to know which value appear most in that "result" field > amoung all records. > cheers > Jack > jacky@activelifestyle.com > "There is nothing more rewarding than reaching the goal you've set for > yourself" > > > >

« previous php.general (#54186) next »