8

I have the following query:

$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::FETCH_OBJ);

But some texts are not showing completely

So I have to change the value of group_concat_max_len. I did as follows:

mysql_query("SET group_concat_max_len = 2048");

But using PDO not know how

user2668863
  • 83
  • 1
  • 4

1 Answers1

15

Can you not use $conn->query()?

$conn->query("SET group_concat_max_len = 2048");
castis
  • 8,154
  • 4
  • 41
  • 63