Output of the "Running raw SQL queries with Doctrine" Doctrine snippet

Environment:

  • Strangebuzz Snippet VM: 2.2.2
  • Symfony: 5.2.0-BETA2

Code execution output:

SELECT type_id, count(*) AS count FROM article WHERE id > ? GROUP BY type_id

array(2) {
  [0]=>
  array(2) {
    ["type_id"]=>
    string(1) "1"
    ["count"]=>
    string(2) "18"
  }
  [1]=>
  array(2) {
    ["type_id"]=>
    string(1) "2"
    ["count"]=>
    string(2) "80"
  }
}
SELECT type_id, count(*) AS count FROM article GROUP BY type_id

array(2) {
  [0]=>
  array(2) {
    ["type_id"]=>
    string(1) "1"
    ["count"]=>
    string(2) "21"
  }
  [1]=>
  array(2) {
    ["type_id"]=>
    string(1) "2"
    ["count"]=>
    string(2) "97"
  }
}