php-db | 2004071
Date: 07/08/04
- Next message: Tim Van Wassenhove: "[PHP-DB] Re: Storing Date in mysql"
- Previous message: John Van Vranken: "[PHP-DB] Query: Top 3 Results grouped by Category"
- Next in thread: Torsten Roehr: "Re: [PHP-DB] fetch row DISTINCT"
- Reply: Torsten Roehr: "Re: [PHP-DB] fetch row DISTINCT"
- Reply: Peter Westergaard: "Re: [PHP-DB] fetch row DISTINCT"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sorry, but it's not truly what I am searching for:
The result is not unique.
What I mean is: every entry in the distinct_col should only be delivered
once.
As it would happen when I do the query "SELECT DISTINCT distinct_col FROM
table".
But I need to fetch the whole row.
Lars
-----Ursprüngliche Nachricht-----
Von: jeffrey_n_Dyke <email protected> [mailto:jeffrey_n_Dyke <email protected>]
Gesendet: Donnerstag, 8. Juli 2004 19:36
An: Lars Hilsebein
Cc: 'php-db <email protected>'
Betreff: Re: [PHP-DB] fetch row DISTINCT
> I'm using PHP with mySQL since a long time.
> But now I got a question:
> I need to generate a SQL-Statement to fetch rows with one DISTINCT
criteria.
> To make things clear: I don't want to fetch a single DISTINCT column, I
want
> to fetch the whole row, where one column is DISTINCT.
> Can someone explain me how to do this?
if i understand correctly this should work
--> select * from table group by distinct_col
hth
jeff
> Kind regards
> Lars Hilsebein
______________________________
<mailto:lars.hilsebein <email protected>> lars.hilsebein <email protected>
------------------------------
mock&more i-net-solutions(r)
Horstmarer Landweg 107
D-48149 Muenster
Tel. +49 251 14490-200
Durchwahl 14490-201
Fax 14490-240
mobil +49 177 3295900
Mail info <email protected> <mailto:info <email protected>>
==============================
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Tim Van Wassenhove: "[PHP-DB] Re: Storing Date in mysql"
- Previous message: John Van Vranken: "[PHP-DB] Query: Top 3 Results grouped by Category"
- Next in thread: Torsten Roehr: "Re: [PHP-DB] fetch row DISTINCT"
- Reply: Torsten Roehr: "Re: [PHP-DB] fetch row DISTINCT"
- Reply: Peter Westergaard: "Re: [PHP-DB] fetch row DISTINCT"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

