numrows is for results, not iterator
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Tue, 1 Feb 2005 21:51:23 +0000 (21:51 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:01 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-432

bin/newsletter.send.php

index 5bfd708..2f85a71 100755 (executable)
@@ -49,7 +49,7 @@ while(true) {
          INNER JOIN  aliases         AS a  ON(u.user_id=a.id AND FIND_IN_SET('bestalias',a.flags))
               WHERE  ni.last<{?}
               LIMIT  60", $id);
-    if (!$res->numRows()) { exit; }
+    if (!$res->total()) { exit; }
 
     $sent = Array();
     while (list($uid, $fmt, $bestalias, $prenom, $nom, $sexe) = $res->next()) {