I have to two tables
tblColorLibrary
id name
1 test color
tblColors
id libraryId colorCode name
1 1 #fff Prime Color
2 1 #ddd Secondry Color
3 1 #E2CFC7 Favorite Color
Below is my query:
$stmt ="SELECT a.id, a.isActive as isActive, a.name as title, GROUP_CONCAT(b.colorCode ) as colors, GROUP_CONCAT(b.name) as name FROM ".$this->tblLibrary." as a JOIN tblcolors as b ON a.id = b.libraryId GROUP BY a.id ORDER BY b.id ASC";
This query will return result like this
Array
(
[0] => Array
(
[id] => 1
[isActive] => Y
[title] => test
[colors] => #fff,#ddd,#E2CFC7
[name] => Prime Color, Secondry Color, Favorite Color
)
)
All goes fine till I have limited records. When I have above 150 records in tblColors, name key gives only limited number of characters. Not getting full records.
I guess there will be limitation in group concat.