Searching for same field twice in a detail table |
10/20/2006 3:02:31 PM |
PHPRunner General questions | |
A
andyjames author
Hi |
|
J
|
Jane 10/23/2006 |
Andy, select `ID`, `FOREIGN ID`, `LANGUAGE` as `language1`, `LANGUAGE` as `language2`, `FIELD4` from `DETAIL TABLE`
|
A
|
andyjames author 10/23/2006 |
Hi Jane |
A
|
andyjames author 11/25/2006 |
It has taken me some time to get round to testing this (work... work...) but I don't seem to be able to get it to work. I have implemented the code as you suggest using "as" plus alias but when you complete a search specifying two different values for lang1 and lang2 and ALL CONDITIONS it returns NO RECORDS FOUND (There are records in there!) |
![]() |
Sergey Kornilov admin 11/27/2006 |
Andy, |
A
|
andyjames author 11/27/2006 |
Hi Sergey |
![]() |
Alexey admin 11/27/2006 |
Andy, |
A
|
andyjames author 11/27/2006 |
Hi Alexey |
A
|
andyjames author 11/29/2006 |
I have managed to work out what the MYSQL query should be, which searches my detail table for the same field that occurs twice: SELECT DISTINCT `userid`, `adhoclang`
|
![]() |
Sergey Kornilov admin 11/29/2006 |
Andy,
|