SQL notes fix

Now fetches actual data, so that it doesn't return null-strings.
And also checks if a client is still present or not.
This commit is contained in:
skull132
2015-06-08 23:40:21 +03:00
parent 4e1f30df5f
commit 8a0e383458
2 changed files with 10 additions and 6 deletions
+4 -2
View File
@@ -21,8 +21,10 @@
if(!IP || !CID)
var/DBQuery/initquery = dbcon.NewQuery("SELECT ip, computerid FROM erro_player WHERE ckey = '[ckey]'")
IP = initquery.item[1]
CID = initquery.item[2]
initquery.Execute()
if(initquery.NextRow())
IP = initquery.item[1]
CID = initquery.item[2]
var/querycontents
if(IP && CID)