Re: php-mysql problem
| From: | Jochem Maas | Date: | Tue, 03 Apr 2007 10:37:19 +0000 |
| Subject: | Re: php-mysql problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251969@lists.php.net to get a copy of this message | ||
Me2resh Lists wrote:
> hi
> i need help regarding a sql query in my php app.
>
> the query is :
> $SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes'
> LIMIT $startingID,$items_numbers_list";
>
> i want to sort this query by the number of the repeated EMail counts.
> can anyone help me with that please ?
somebody on a mysql mailing list per chance?
you are trying to solve a problem that is purely related to SQL query building,
this has nothing to do with php.
I would suggest you check out the mysql manual and read up on 'GROUP BY',
'COUNT()'
and 'ORDER BY' - from your question I am guessing that these three hold the answer
to your problem between them
>