|I don't know, however I think it can't be done because the results would be undefined.
Assume the MODELS table holds the following data:
If you do
"SELECT DISTINCT field1 FROM MODELS" you would get 1, 5, and 7.
Now there are three rows with field1=1, which field2 value should contribute to the result?
"SELECT field2, DISTINCT(field1) FROM MODELS" would be accepted, the field2 values would be unpredictable, i.e. the query is ambiguous.
Things would make more sense if you would need, and were allowed to do, the following:
"SELECT MAX(field2), DISTINCT(field1) FROM MODELS"
PS: this isn't a PHP question, it is a database related question, the MySQL forum would have been a better choice.
Luc Pattyn [Forum Guidelines] [My Articles]
Nil Volentibus Arduum
Please use <PRE>
tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.