[HELP] Help me please - Cannot fetch data! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Help me please - Cannot fetch data! (
/showthread.php?tid=142475)
[HELP] Help me please - Cannot fetch data! -
DarrenReeder - 18.04.2010
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')
Re: [HELP] Help me please - Cannot fetch data! -
DarrenReeder - 18.04.2010
*New question!
Re: [HELP] Help me please - Cannot fetch data! -
DarrenReeder - 18.04.2010
bump
Re: [HELP] Help me please - Cannot fetch data! -
FUNExtreme - 18.04.2010
Are the numbers correct in the database?
Re: [HELP] Help me please - Cannot fetch data! -
DarrenReeder - 18.04.2010
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!
Re: [HELP] Help me please - Cannot fetch data! -
DarrenReeder - 19.04.2010
bump
Re: [HELP] Help me please - Cannot fetch data! -
DarrenReeder - 19.04.2010
bump
Re: [HELP] Help me please - Cannot fetch data! -
FUNExtreme - 19.04.2010
Does the mysql plugin you use have a debug function? If so, enable it and look at what it prints in the debug log.
Re: [HELP] Help me please - Cannot fetch data! -
DarrenReeder - 19.04.2010
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
Re: [HELP] Help me please - Cannot fetch data! -
DarrenReeder - 19.04.2010
bump