Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating a list/menu with table data (non-unique)

Status
Not open for further replies.

wraygun

Programmer
Dec 9, 2001
272
US
Hi there,

I have a table (pictures) that has a unique field (pictureid) and several non-unique fields. I would like to populate a list box with the records that will likely have duplicates (username and galleryname). I want to populate it in a way that there will be no duplicates in the list/menu, even though there are duplicates in the database. I can't seem to wrap my mind around the logic to get this done. Any help or pointers would be greatly appreciated.

Thanks so much,
Harold


***You can't change your past, but you can change your future***
 
Take a look at "GROUP BY field_1,field_2". Also "SELECT DISTINCT" can sometimes be used.

Not sure what your code looks like, so I can't suggest one or the other. :)

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top