i require query for following scenario
I have two table
table1 have following columns
person_id
Name
gender
and has 1 record
person_id Name gender
1 Robert Male
and table2 has following column
person_id
result1
and has following 3 rows
person_id result
1 php1
1 php2
1 php3
I need query for displaying result like this
Robert male php1 php2 php3
Query Required
Moderator: General Moderators
- DigitalMind
- Forum Contributor
- Posts: 152
- Joined: Mon Sep 27, 2010 2:27 am
- Location: Ukraine, Kharkov
Re: Query Required
that's impossible
Re: Query Required
psssht....DigitalMind wrote:that's impossible
- DigitalMind
- Forum Contributor
- Posts: 152
- Joined: Mon Sep 27, 2010 2:27 am
- Location: Ukraine, Kharkov
Re: Query Required
yes, if we want to output it as a single field.mikosiko wrote: GROUP_CONCAT
you're right
probably i misunderstood the question. i thought it needs to output result as separate fields
Re: Query Required
If there are always 3 rows () in person_id result, then one could create some kind of a cross-table query ... but only and if only there are always 3 rows in person_id result. Which on the other hand sounds like a redundant "db normalization".
There are 10 types of people in this world, those who understand binary and those who don't