]> git.mxchange.org Git - mailer.git/blobdiff - inc/fix_user_points.php
Fixes/rewrites for ext-surfbar:
[mailer.git] / inc / fix_user_points.php
index d7d16223561632ff604c5ed6eeb5c94d8ebfd629..addaae100c6c3931adc406130d6ca87d8f714e15 100644 (file)
@@ -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