3 added 28 characters in body
source | link

Use add_field() with array('function' => 'groupby') parameter.

$query->add_field('node', 'nid', 'node_nid', array('function' => 'groupby'));
$query->add_groupby('node.nid');

But afterAditional information:

After using add_groupby you couldmight see the next code after GROUP BY:

GROUP BY node.nid, nid

See the next issue: https://drupal.org/node/1578808

To avoid unnecessary GROUP BY conditions add:

$query->distinct = TRUE;

Use add_field() with array('function' => 'groupby') parameter.

$query->add_field('node', 'nid', 'node_nid', array('function' => 'groupby'));
$query->add_groupby('node.nid');

But after using add_groupby you could see the next code after GROUP BY:

GROUP BY node.nid, nid

See the next issue: https://drupal.org/node/1578808

To avoid unnecessary GROUP BY conditions add:

$query->distinct = TRUE;

Use add_field() with array('function' => 'groupby') parameter.

$query->add_field('node', 'nid', 'node_nid', array('function' => 'groupby'));
$query->add_groupby('node.nid');

Aditional information:

After using add_groupby you might see the next code after GROUP BY:

GROUP BY node.nid, nid

See the next issue: https://drupal.org/node/1578808

To avoid unnecessary GROUP BY conditions add:

$query->distinct = TRUE;
2 added 81 characters in body
source | link

Use add_field() with array('function' => 'groupby') parameter.

$query->add_field('node', 'nid', 'node_nid', array('function' => 'groupby'));
$query->add_groupby('node.nid');

But after using add_groupby you could see the next code after GROUP BY:

GROUP BY node.nid, nid

See the next issue: https://drupal.org/node/1578808

To avoid unnecessary GROUP BY conditions add:

$query->distinct = TRUE;

Use add_field() with array('function' => 'groupby') parameter.

$query->add_field('node', 'nid', 'node_nid', array('function' => 'groupby'));
$query->add_groupby('node.nid');

But after using add_groupby you could see the next code after GROUP BY:

GROUP BY node.nid, nid

See the next issue: https://drupal.org/node/1578808

Use add_field() with array('function' => 'groupby') parameter.

$query->add_field('node', 'nid', 'node_nid', array('function' => 'groupby'));
$query->add_groupby('node.nid');

But after using add_groupby you could see the next code after GROUP BY:

GROUP BY node.nid, nid

See the next issue: https://drupal.org/node/1578808

To avoid unnecessary GROUP BY conditions add:

$query->distinct = TRUE;
1
source | link

Use add_field() with array('function' => 'groupby') parameter.

$query->add_field('node', 'nid', 'node_nid', array('function' => 'groupby'));
$query->add_groupby('node.nid');

But after using add_groupby you could see the next code after GROUP BY:

GROUP BY node.nid, nid

See the next issue: https://drupal.org/node/1578808