Re: Duplicates
| From: | Justin French | Date: | Wed, 23 Oct 2002 12:04:59 +0000 |
| Subject: | Re: Duplicates | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-general+get-121068@lists.php.net to get a copy of this message | ||
Check out DISTINCT in the MySQL manual....
SELECT DISTINCT(yourdatecolumn) * FROM tablename WHERE ......
or something like that
Justin
on 23/10/02 10:04 PM, Chris Grigor (chris@calibre.co.za) wrote:
> Howdi all,
>
> How can you list the contents of a table and skip duplicate Dates??
> eg
>
> select Date from table_name where name = 'Test';
>
> ----------------------------------------
> |Date|
> ----------------------------------------
> 2000-01-01
> 2000-01-02
> 2000-01-02 <------- How would you get rid of this duplicate date (without
> deleting it ;-))?
>
> I want to just get a list of dates in the table that querys have been
> inserted, but not duplicate dates...
>
> Say for instance I had 1 entry on 2000-01-01, and I had 10 entrys on
> 2000-01-02 I want it to tell me that
> there is a date for 2000-01-01 and a date for 2000-01-02, not for it to tell
> me there is 10 entrys on 2000-01-02
>
> Any help would be appreciated
>
> Many Thanks guys
>
>
>
>
>
> --------------------------------------
> Chris Grigor
>
> Calibre Clinical Consultants
>
> --------------------------------------
>
>