- foreach (postRequestElement('sel') as $id => $value) {
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_must_register` SET field_required='%s' WHERE `id`=%s AND field_required != '%s' LIMIT 1",
- array($value, bigintval($id), $value),__FILE__, __LINE__);
- }
- loadTemplate('admin_settings_saved', false, getMessage('REGISTER_ADMIN_CHANGES_SAVED'));
-}
+ // Begin counting
+ $cnt = 0;
+
+ // Update all entries
+ foreach (postRequestParameter('sel') as $id => $value) {
+ // Update database
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_must_register` SET `field_required`='%s' WHERE `id`=%s AND `field_required` != '%s' LIMIT 1",
+ array($value, bigintval($id), $value),__FILE__, __LINE__);
+
+ // Get affected rows
+ $cnt += SQL_AFFECTEDROWS();
+ } // END - foreach
+
+ // Output message for updated entries
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('REGISTER_ADMIN_CHANGES_SAVED', $cnt));
+} // END - if