Is there any way to run a query in mysql that retuns unique values in a
column? For example, say i had this colum:
Column:
-
Fashion
-
Basics
-
Fashion
-
Plus
Plus
-
but I only want it to return unique values - in this case I would only
want
use: SELECT DISTINCT column FROM table
regards,
Ewout de Boer
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 14, 2002 10:17 PM
Subject: [PHP] returning unique values in columns
Is there any way to run a query in mysql that retuns
GROUP BY column ???
For example if you want the count(*) of each value
do like this
SELECT column, count(*) from 'tablename' GROUP BY column ;
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 15, 2002 8:17 AM
Subject: [PHP] returning unique
Check out DISTINCT in the MySQL manual... or is it UNIQUE ??
Try something like SELECT DISTINCT * FROM
JF
on 15/11/02 7:17 AM, [EMAIL PROTECTED] ([EMAIL PROTECTED])
wrote:
but I only want it to return unique values - in this case I would only
want Fashion, Basics, Plus - instead of
4 matches
Mail list logo