From f93f5587373b27c696d55890eca439b6d22b5f6e Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Mon, 17 Sep 2012 09:53:42 +0000
Subject: [PATCH] Poprawa błędnego warunku w zapytaniu SQL (zmienna=NULL na zmienna IS NULL)

---
 class/BotSession.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/class/BotSession.php b/class/BotSession.php
index 25ec23c..494f377 100644
--- a/class/BotSession.php
+++ b/class/BotSession.php
@@ -55,10 +55,10 @@
 				$version = 1;
 			}
 			
-			if($version < 2) {
-				$this->PDO->query('DELETE FROM data WHERE class=NULL AND name=\'user_struct\'');
-				$this->PDO->query('INSERT OR REPLACE INTO data (class, name, value) VALUES (\'\', \'_version\', 2)');
-				$version = 2;
+			if($version < 3) {
+				$this->PDO->query('DELETE FROM data WHERE class IS NULL AND name=\'user_struct\'');
+				$this->PDO->query('INSERT OR REPLACE INTO data (class, name, value) VALUES (\'\', \'_version\', 3)');
+				$version = 3;
 			}
 			
 			return;

--
Gitblit v1.9.1