More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / modules / admin / what-guest_add.php
index 423415b7bb8d1d9cb3c3756527066c5bdca5980a..d86210f5319ef5c7f1b4e9442c7f5405f596f993 100644 (file)
@@ -64,7 +64,7 @@ WHERE
        (`what`='' OR `what` IS NULL)
 ORDER BY
        `sort` ASC", __FILE__, __LINE__);
        (`what`='' OR `what` IS NULL)
 ORDER BY
        `sort` ASC", __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // Read menu structure
                // @TODO Cant this be rewritten?
                while ($content = SQL_FETCHARRAY($result)) {
                // Read menu structure
                // @TODO Cant this be rewritten?
                while ($content = SQL_FETCHARRAY($result)) {
@@ -112,7 +112,7 @@ WHERE
        `what` IS NOT NULL
 ORDER BY `sort` ASC",
                                array($value_main), __FILE__, __LINE__);
        `what` IS NOT NULL
 ORDER BY `sort` ASC",
                                array($value_main), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result) > 0) {
+                       if (!SQL_HASZERONUMS($result)) {
                                // Initialize arrays
                                $menus[$value_main] = array();
                                $titles[$value_main] = array();
                                // Initialize arrays
                                $menus[$value_main] = array();
                                $titles[$value_main] = array();