]> git.mxchange.org Git - mailer.git/blobdiff - inc/fix_user_points.php
If min/max beg points are the same output only min points
[mailer.git] / inc / fix_user_points.php
index d7d16223561632ff604c5ed6eeb5c94d8ebfd629..51381811d91163582fdb4c63d1938283111e3ced 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -70,6 +70,17 @@ if (!SQL_HASZERONUMS($result)) {
                                                $row[$column],
                                                $row['userid']
                                        ), __FILE__, __LINE__);
+
+                               // Nothing has been updated?
+                               if (SQL_HASZEROAFFECTED()) {
+                                       // Then insert it
+                                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_points` (`userid`,`ref_depth`,`%s`) VALUES (%s,NULL,%s)",
+                                               array(
+                                                       $column,
+                                                       $row['userid'],
+                                                       $row[$column]
+                                               ), __FILE__, __LINE__);
+                               } // END - if
                        } // END - if
                } // END - foreach
        } // END - while