Raised This Month: $ Target: $400
 0% 

error in admin.amxx


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sutar
Senior Member
Join Date: Sep 2010
Old 09-28-2012 , 02:20   Re: error in admin.amxx
Reply With Quote #3

So I did this:
Code:
		new qcolAuth = SQL_FieldNameToNum(query, "username")
		new qcolPass = SQL_FieldNameToNum(query, "password")
		new qcolAccess = SQL_FieldNameToNum(query, "access")
		new qcolFlags = SQL_FieldNameToNum(query, "flags")
		new qcolDate = SQL_FieldNameToNum(query, "adddate")
		new qcolTime = SQL_FieldNameToNum(query, "timelife")
		
		server_print("SQL qcolAuth %d", qcolAuth)
		server_print("SQL qcolPass %d", qcolPass)
		server_print("SQL qcolAccess %d", qcolAccess)
		server_print("SQL qcolFlags %d", qcolFlags)
		server_print("SQL qcolDate %d", qcolDate)
		server_print("SQL qcolTime %d", qcolTime)
		
		while(SQL_MoreResults(query))
		{
			SQL_ReadResult(query, qcolAuth, g_aName[g_aNum], 31)
			SQL_ReadResult(query, qcolPass, g_aPassword[g_aNum], 15)
			SQL_ReadResult(query, qcolAccess, szAccess, 24)
			SQL_ReadResult(query, qcolFlags, szFlags, 1)
			SQL_ReadResult(query, qcolDate, g_aDate[g_aNum], 11)
			SQL_ReadResult(query, qcolTime, g_aLife[g_aNum], 11)
			
			g_aAccess[g_aNum] = read_flags(szAccess)
			g_aFlags[g_aNum] = read_flags(szFlags)
			
			++g_aNum
			SQL_NextRow(query)
		}
And I found:
Quote:
qcolAuth 0
SQL qcolPass 1
SQL qcolAccess 2
SQL qcolFlags 3
SQL qcolDate 4
SQL qcolTime 5
MySQL reads a field from 0?

Last edited by Sutar; 09-28-2012 at 02:22.
Sutar is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode