[HELP] Help me please - Cannot fetch data!
#1

This is my problem...When i try to fetch all the data for my player account, the Username and pass print correctly however the numbers are wrong.. this is my code:

Код:
		//----------==========Load accoutn info==========----------
		mysql_fetch_field("ID",PlayerStats[playerid][pId]);
		mysql_fetch_field("user",PlayerStats[playerid][pUser]);
		mysql_fetch_field("pass",PlayerStats[playerid][pPass]);
		mysql_fetch_field("admin", PlayerStats[playerid][pAdmin]);
		printf("ID:%i,User:%s,Pass:%s,Admin:%i",PlayerStats[playerid][pId],PlayerStats[playerid][pUser],PlayerStats[playerid][pPass],PlayerStats[playerid][pAdmin]);
It should say this on the console:

Код:
ID:2,User:HighDarren,Pass:test,Admin:0
Although it says this instead:

Код:
ID:50,User:HighDarren,Pass:test,Admin:48
so, as u can see its the numbers that are not working.. (they are type 'int' on the Database...the text based ones are 'varchar')
Reply
#2

*New question!
Reply
#3

bump
Reply
#4

Are the numbers correct in the database?
Reply
#5

Quote:
Originally Posted by FUNExtreme
Are the numbers correct in the database?
Yea, it should be ID:2, admin:0 , but it doesnt show as that!
Reply
#6

bump
Reply
#7

bump
Reply
#8

Does the mysql plugin you use have a debug function? If so, enable it and look at what it prints in the debug log.
Reply
#9

Quote:
Originally Posted by FUNExtreme
Does the mysql plugin you use have a debug function? If so, enable it and look at what it prints in the debug log.
There is no clear debug function? this is what i am using:

http://forum.sa-mp.com/index.php?top...ql_query_array
Reply
#10

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)