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

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.