Tons of rewrites (SQL queries), surfbar nearly finished (working: surfing with static...
[mailer.git] / inc / reset / reset_daily.php
index a02548c322d9085fb95677a19a52e50e93dd8933..9df8158716b335d423c99fe096c40e2487d22e28 100644 (file)
@@ -56,7 +56,7 @@ if (SQL_NUMROWS($result_daily) > 0)
        while (list($uid) = SQL_FETCHROW($result_daily))
        {
                $result_points = SQL_QUERY_ESC("SELECT ref_depth, locked_points FROM "._MYSQL_PREFIX."_user_points
-WHERE userid=%d AND locked_points != 0.00000 ORDER BY ref_depth",
+WHERE userid=%s AND locked_points != 0.00000 ORDER BY ref_depth",
                 array(bigintval($uid)), __FILE__, __LINE__);
                if (SQL_NUMROWS($result_points) > 0)
                {
@@ -64,7 +64,7 @@ WHERE userid=%d AND locked_points != 0.00000 ORDER BY ref_depth",
                        while (list($dep, $locked) = SQL_FETCHROW($result_points))
                        {
                                $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s, locked_points=0.00000
-WHERE userid=%d AND ref_depth=%d LIMIT 1",
+WHERE userid=%s AND ref_depth=%s LIMIT 1",
                                 array($locked, bigintval($uid), $dep), __FILE__, __LINE__);
 
                                // Update mediadata as well