--- D:\Profiles\nathan\LOCALS~1\Temp\community_tags.module-rev639.svn000.tmp.module	Thu Jul 17 11:32:36 2008
+++ C:\Programs\WAMP\www\TRUNK\sites\all\modules\community_tags\community_tags.module	Thu Jul 17 11:24:23 2008
@@ -20,7 +20,7 @@
 }
 
 /** 
- * Implementation oh hook_update_index().
+ * Implementation of hook_update_index().
  */
 function community_tags_update_index() {
   // Last cron run
@@ -28,9 +28,11 @@
   $limit = (int)variable_get('search_cron_limit', 100);
  
   $sql = "SELECT nid FROM {community_tags} WHERE date > %d";
+  $sqlcount = "SELECT COUNT(nid) FROM {community_tags} WHERE date > %d";
   $result = db_query_range($sql, $last, 0, $limit);
- 
-  if ($result && db_num_rows($result) > 0) {
+  $resultcount = db_query_range($sqlcount, $last, 0, $limit);
+
+  if ($result && db_result($resultcount) > 0) {
     while ($data = db_fetch_object($result)) {
       $node = node_load($data->nid);
       // Build the node body.
