Better SQL statement, allows NULL rid
authorunc0rr
Sun, 12 Apr 2009 06:01:17 +0000
changeset 1963 58c29439225d
parent 1962 1459c9adf84b
child 1964 dc9ea05c9d2f
Better SQL statement, allows NULL rid
gameServer/OfficialServer/DBInteraction.hs
--- a/gameServer/OfficialServer/DBInteraction.hs	Sat Apr 11 13:25:26 2009 +0000
+++ b/gameServer/OfficialServer/DBInteraction.hs	Sun Apr 12 06:01:17 2009 +0000
@@ -36,8 +36,7 @@
 -------------------------------------------------------------------
 
 dbQueryString =
-	"SELECT users.pass, users_roles.rid FROM `users`, users_roles "
-	++ "WHERE users.name = ? AND users_roles.uid = users.uid"
+	"select users.pass, users_roles.rid from users left join users_roles on users.uid = users_roles.uid where users.name = ?"
 
 dbInteractionLoop queries coreChan dbConn = do
 	q <- readChan queries