Is there any solution NOT involving COUNT() ?

Otherwise the Drupal Handbook (http://drupal.org/node/161974) has the most straightforward PHP snippet:

<?php
  $mytype
= 'job'//   <<---------- set your content type here.
 
$results = db_query("SELECT COUNT(DISTINCT(nid)) FROM {node} WHERE type='%s' AND status=1", $mytype);
 
$count = db_num_rows($results);
  echo
"There are currently $count jobs in our database.";
?>

Victor Kane
http://awebfactory.com.ar
http://projectflowandtracker.com

On Wed, Dec 22, 2010 at 11:16 AM, Denis Lafont-Trevisan <denis.lafont@gmail.com> wrote:

Hi,

Just for the archive, the answer was using Views GroupBy module.

Cheers,

Denis

On Wed, Dec 22, 2010 at 12:36 PM, Shai Gluskin <shai@content2zero.com> wrote:

On Dec 22, 2010, at 3:23 AM, Denis Lafont-Trevisan <denis.lafont@gmail.com> wrote:

> Hi,
>
> Sounds stupid but I can't manage to create a view that count the number of node of a certain type each user created.
>
>
> Any clue?
>
> Cheers,
>
> Denis
> --
> [ Drupal support list | http://lists.drupal.org/ ]
--
[ Drupal support list | http://lists.drupal.org/ ]


--
[ Drupal support list | http://lists.drupal.org/ ]