Re: MySQL - Selecting Unique Entries

From: Date: Wed, 03 Oct 2001 03:29:20 +0000
Subject: Re: MySQL - Selecting Unique Entries
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69678@lists.php.net to get a copy of this message
I've never heard of select distinct not working... Is that the exact SQL you are using? -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Tom Churm <thomas.churm@pixelpark.com> Newsgroups: php.general To: <php-general@lists.php.net> Sent: Friday, September 28, 2001 7:29 AM Subject: MySQL - Selecting Unique Entries > hi, > > i need to weed out all duplicate entries in a select statement. > i've done research and have discovered 2 different possible solutions > for this. i'd like to know which one is better to use? > > after trying them out on MySQL, Select Distinct appears to be highly > unreliable. i get somewhat better results when i use Select Distinct > trim(seminar_name), but this Group By solution seems to work better: > > SELECT seminar_name > FROM student_table GROUP BY seminar_name > > SELECT DISTINCT seminar_name > FROM student_table > > thanks for the advice, > > tom

« previous php.general (#69678) next »