fixed WIN32 compatibility
[NeonServV5.git] / src / DBHelper.c
index 20037156cab4819c9c22bd14572393f29170f8e9..56bd924e41f2bb2c2e22add62265ad505ef0f2c4 100644 (file)
@@ -314,7 +314,7 @@ void deleteUser(int userid) {
             //unregister channel
             printf_mysql_query("SELECT `botid`, `channel_name` FROM `bot_channels` LEFT JOIN `channels` ON `chanid` = `channel_id` WHERE `chanid` = '%s' AND `suspended` = '0'", row[1]);
             res2 = mysql_use();
-            while((row2 = mysql_fetch_row(res))) {
+            while((row2 = mysql_fetch_row(res2))) {
                 struct ClientSocket *bot;
                 int clientid = atoi(row2[0]);
                 for(bot = getBots(SOCKET_FLAG_READY, NULL); bot; bot = getBots(SOCKET_FLAG_READY, bot)) {