View Full Version : PHP/MySQL: Listing strings from a field

Jun 19, 2003, 02:03 PM
Here's something I'm running up against in a project at work. We are developing a system that allows people to upload content to us, filling out some text fields, etc. I want to use the values from one field in the database table to build a menu. Here's the catch: There will be matching strings in separate records in the field. For instance,
1, French, blah, blah
2, German, blah, blah
3, English, blah, blah
4, French, blah, blah

I don't want a menu that goes French, German, English, French, but leaves out a language once it's already been listed. I know I can do this by making a separate table to list the languages, but I'd prefer not to.

Anyone know how to do it?

Jun 19, 2003, 03:46 PM
Nevermind. I posted to DevShed and got my answer.

"SELECT DISTINCT language FROM table"