Unanswered: how to get the rows data as column data for each primary key
i have two tables. one table with personid and names. another table with id and list of messages related to personid. now i need to list out each person id and messages as columns data. messages are multiple to a person. how can i get with a set of queries using joins or any such related tools with out any programming language intervention.
my out put should be like this
first row: personid1,person2, message1,message2 etc..
sec row: peronid2,person2,message1 etc...
you know number of fields are dynamic