Hi folks! The following problem:
I got a db (mysql) with information about doctors. Name, adress, phone etc. Now I'm reading these information with a simple mysql-query: $queryString = "SELECT DISTINCT m.$sureName, m.$preName, m.$prax, m.$title, "; $queryString .= "p.$town, p.$zip, p.$phone, p.$description "; $queryString .= "FROM $medTable m, $praxTable p WHERE "; $queryString .= "m.$prax = p.$id"; Normally, I print out the information like this: Dr. med. John Doe // $title, $preName, $sureName (shared practice) // description Elmstreet 13 // $street 666 Amityville 23 // $zip, $town phone: 0049 - 815 - 4711 // $phone Okay. Now some of these folks are sharing a practice ($description in the above code == "shared practice"). I would like to have these grouped together like this: Dr. med. John Doe // $title, $preName, $sureName Dr. med. Allan Smithee (shared practice) // description Elmstreet 13 // $street 666 Amityville 23 // $zip, $town phone: 0049 - 815 - 4711 // $phone I am starting to get a little confused right here and right now. This is the reason for being THIS detailed, too ;) Don't want to mix anything up. How would you achieve this goal fastest and "best"? Creating a temp array and checking for double $description-s which I store in the temp array and delete from the original one? Or check this with the original array? How? I found functions to get the value for one key in a hash, but not for several values with the same key... Sorry for the confusion, starting to get fuzzy... Any ideas, hints? Thanx alot, Kiko -- It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.gruppe-69.com/ ICQ: 100601600 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php