Re: Display only one filed of the repeated records

From: Date: Tue, 30 Nov 2004 11:56:33 +0000
Subject: Re: Display only one filed of the repeated records
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-203125@lists.php.net to get a copy of this message
Ahmed Abdel-Aliem wrote:
Hi, i have a tables in database which fields is id - title - category what i want to do is to display the categories entered in the categories fields, without repeating any of them for eample if the records is like follow
ID          Title               Cattegory
1            Matrix           Sci-Fi
2            Spartacus     History
3            Alexander     History
4            whatever       Horror
i want to list the categories only like this Sci-Fi - History - Horror can anyone help me throught this please ?
This is an SQl question, but anyway: select distinct Cattegory from table

« previous php.general (#203125) next »