I have a two table first is simple primary key based table and second table is keyvaluepair for maintaining records.
Now I want to get records from Table in a single object. If they come as comma separate it’s good.
Suppose I have table
ID valueID.
When I will run select query I not want a list of rows. I want a single column (in a row) that I can get the information about all valueIds.
Could someone explain me how can I get them in one instead of list?
You probably want to use
GROUP_CONCAT.http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_group-concat
If you need both the
IDand thevalueID, you’re better off sticking with an array.