Click here to Skip to main content
15,908,906 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
Question[SOLVED] Select with UNICODE Pin
CodingLover7-Jun-11 1:03
CodingLover7-Jun-11 1:03 
AnswerRe: Select with UNICODE Pin
Dimitris Vasiliadis7-Jun-11 9:00
Dimitris Vasiliadis7-Jun-11 9:00 
GeneralRe: Select with UNICODE Pin
CodingLover8-Jun-11 3:01
CodingLover8-Jun-11 3:01 
QuestionError While Senting Email Pin
Arunkumar.Koloth3-Jun-11 22:13
Arunkumar.Koloth3-Jun-11 22:13 
AnswerRe: Error While Senting Email [modified] Pin
That's Aragon3-Jun-11 23:07
That's Aragon3-Jun-11 23:07 
GeneralRe: Error While Senting Email Pin
Arunkumar.Koloth3-Jun-11 23:38
Arunkumar.Koloth3-Jun-11 23:38 
Questionyoutube upload using zend Pin
ammeer_a3-Jun-11 9:41
ammeer_a3-Jun-11 9:41 
QuestionGetting null value on $objWMI->ExecQuery('select * from win32_LogonSession') for some virtual machines. Pin
shankysharma861-Jun-11 1:48
shankysharma861-Jun-11 1:48 
QuestionMini WebShop Pin
n38130-May-11 1:06
n38130-May-11 1:06 
Generalupload photo Pin
emsiden29-May-11 16:49
emsiden29-May-11 16:49 
AnswerRe: upload photo Pin
Firo Atrum Ventus29-May-11 17:52
Firo Atrum Ventus29-May-11 17:52 
QuestionFor Loop does not work Pin
Dwayner7927-May-11 14:21
Dwayner7927-May-11 14:21 
AnswerRe: For Loop does not work PinPopular
Graham Breach27-May-11 21:27
Graham Breach27-May-11 21:27 
GeneralRe: For Loop does not work Pin
Firo Atrum Ventus28-May-11 0:02
Firo Atrum Ventus28-May-11 0:02 
GeneralRe: For Loop does not work Pin
Dwayner7928-May-11 12:31
Dwayner7928-May-11 12:31 
QuestionData Mapping in PHP Pin
grmihel225-May-11 3:47
grmihel225-May-11 3:47 
AnswerRe: Data Mapping in PHP Pin
cjoki25-May-11 5:56
cjoki25-May-11 5:56 
GeneralRe: Data Mapping in PHP Pin
grmihel225-May-11 21:54
grmihel225-May-11 21:54 
GeneralRe: Data Mapping in PHP Pin
cjoki26-May-11 9:43
cjoki26-May-11 9:43 
GeneralIphone Development Training Courses Pin
karnti45451-Jun-12 23:18
karnti45451-Jun-12 23:18 
QuestionMySQL & PHP query: using SELECT * and DISTINCT Pin
whatsa19-May-11 14:25
whatsa19-May-11 14:25 
AnswerRe: MySQL & PHP query: using SELECT * and DISTINCT Pin
Luc Pattyn19-May-11 15:31
sitebuilderLuc Pattyn19-May-11 15:31 
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:
field1   field2
1         2
1         3
1         4
5         6
7         8
7         9


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?
Assuming "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"

Smile | :)

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.

AnswerRe: MySQL & PHP query: using SELECT * and DISTINCT Pin
urtrivedi19-May-11 17:58
urtrivedi19-May-11 17:58 
AnswerRe: MySQL & PHP query: using SELECT * and DISTINCT Pin
cjoki25-May-11 5:41
cjoki25-May-11 5:41 
Questionecho not working Pin
Steve Harp19-May-11 6:05
Steve Harp19-May-11 6:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.