Questions tagged [group-concat]

a program that generates a string representation by combining all valid values within a set

Adjust the group_concat_max_len setting for a PDO query

I would like to share the query I'm working on: $cases = $conn->prepare("SELECT GROUP_CONCAT(text SEPARATOR '|') as texts, year FROM cases GROUP BY year ORDER BY ano DESC"); $cases->execute(); $cases_result = $cases->fetchAll(PDO:: ...

CodeIgniter's GROUP_CONCAT function allows you to concatenate the values

I'm currently having trouble figuring out how to create my group_concat with my SQL request in CodeIgniter. I have a table listing all my queries, using the Jtable library. Everything works fine except when I attempt to insert GROUP_CONCAT. Below is my m ...

Converting MySQL data to JSON format with PHP and utilizing the GROUP_CONCAT function

I've been trying to convert my home temperature table into JSON format. While I have successfully achieved this for one location using WHERE, I'm struggling to get the code right in order to group it by location, as demonstrated below. I am work ...