Re: SQL query...
| From: | CPT John W. Holmes | Date: | Thu, 15 Jan 2004 13:17:11 +0000 |
| Subject: | Re: SQL query... | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32408@lists.php.net to get a copy of this message | ||
From: "Muhammed Mamedov" <muhammed@ytm.com.tr>
> Try this
>
> "SELECT DISTINCT(file_name), Count(file_name) AS cnt FROM $table_name
WHERE
> date
> > BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by cnt;
> > desc"
If you're GROUPing by "file_name" then you don't need DISTINCT(file_name)...
it's redundant.
---John Holmes...