X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-chk_regs.php;h=234d0029c7fa506e0b16819f9873c748f6ea5afd;hb=22a33b87f9894a94efb71de7630f12129e34f83b;hp=8f8ebc36afda6393af5ffde72255137f0d1b6c8c;hpb=7f104f6fe558bb56b4205241435a2357c2feece1;p=mailer.git diff --git a/inc/modules/admin/what-chk_regs.php b/inc/modules/admin/what-chk_regs.php index 8f8ebc36af..234d0029c7 100644 --- a/inc/modules/admin/what-chk_regs.php +++ b/inc/modules/admin/what-chk_regs.php @@ -41,12 +41,15 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR ("admin", basename(__FILE__)); // Check for accounts -$query = SQL_QUERY("SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, user_hash FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED' ORDER BY userid", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, user_hash +FROM `"._MYSQL_PREFIX."_user_data` +WHERE status='UNCONFIRMED' +ORDER BY userid ASC", __FILE__, __LINE__); -if (SQL_NUMROWS($query) > 0) { +if (SQL_NUMROWS($result) > 0) { // We have some (new?) registrations! $SW = 2; $OUT = ""; - while (list($uid, $gender, $sname, $fname, $email, $IP, $ref, $hash) = SQL_FETCHROW($query)) { + while (list($uid, $gender, $sname, $fname, $email, $IP, $ref, $hash) = SQL_FETCHROW($result)) { if ($ref > 0) $ref = ADMIN_USER_PROFILE_LINK($ref); // Prepare array for the row template $content = array( @@ -66,8 +69,7 @@ if (SQL_NUMROWS($query) > 0) { $SW = 3 - $SW; } - // Free memory - SQL_FREERESULT($query); + // Remember rows define('__REG_ROWS', $OUT); // Load main template @@ -77,5 +79,8 @@ if (SQL_NUMROWS($query) > 0) { LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ALL_CONFIRMED_EMAIL); } +// Free memory +SQL_FREERESULT($result); + // ?>