1,105,334 Community Members

Combo box issues

Member Avatar
joseph.lyons.754
Light Poster
35 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hey guys

im populating a combo box from my database i was just wondering how do i prevent the combo box from displaying different instances of the same value. e.g three B&Bs all from ennis. ennis is in the combobox but its displayed three times.

how do i stop this ??

Thanks

Member Avatar
pritaeas
mod_pritaeas
11,315 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 156 [?]
Moderator
Featured
Sponsor
 
0
 

Show the query you use to retrieve the values (and some sample data would be helpful too).

Member Avatar
simplypixie
Practically a Master Poster
673 posts since Oct 2010
Reputation Points: 123 [?]
Q&As Helped to Solve: 122 [?]
Skill Endorsements: 6 [?]
 
0
 

I agree with @pritaeas but off the top of my head, use DISTINCT in your query to only retrieve one instance of the same value.

Member Avatar
joseph.lyons.754
Light Poster
35 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Thanks Guys Distinct srted it

Member Avatar
Szabi Zsoldos
Posting Whiz in Training
244 posts since Jul 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 35 [?]
Skill Endorsements: 2 [?]
 
0
 

You can use distinct or Group BY, either of that works.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: