Thursday, December 26, 2013

Get rows count in Drupal 7

<?php

$query = db_select('table1')->fields('users')->execute();
$count = $query->rowCount();

?>

No comments:

Post a Comment