Questions tagged [group-concat]
a program that generates a string representation by combining all valid values within a set
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:: ...
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 ...
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 ...