* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * 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 *
ORDER BY
`userid` ASC', __FILE__, __LINE__);
-// Do we have entries? (we should have!)
+// Are there entries? (there should be!)
if (!SQL_HASZERONUMS($result)) {
// Load row by row
while ($row = SQL_FETCHARRAY($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