|
|
#1 |
|
Little Clucker
![]() Join Date: Apr 2011
Posts: 45
Reputation: 0
|
Hello.
For loading player data, I'm using this: Code:
mysql_real_escape_string(inputtext, EscPass);
format(Query, sizeof(Query), "SELECT * FROM `playerinfo` WHERE `user` = '%s' AND `password` = md5('%s')", pName(playerid), EscPass);
mysql_query(Query);
mysql_store_result();
stock savePlayer(playerid)
{
if(mysql_fetch_row(Query))
{
sscanf(Query, "e<p<|>s[32]dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfffddddffddddddddddddddddddddddddddddddddddddddddddddddddds[32]ds[32]ds[32]ds[32]ds[32]dddddddddddddddddddddddddddddd>", PlayerInfo[playerid]);
mysql_free_result();
}
}
That is pretty useful because I don't need to write all the playerinfo variables, it includes all.. How can I do something simillar to save player data? Thank's. |
|
|
|
|
|
#2 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2010
Posts: 756
Reputation: 25
|
"UPDATE db SET (row1,row2,row3) VALUES (0,0,0) WHERE nick = '%s'"
hope i helped you |
|
|
|
|
|
#3 |
|
Little Clucker
![]() Join Date: Apr 2011
Posts: 45
Reputation: 0
|
To put the values variables I will need to put more than 100 variables..
Can't I do something like the loadPlayer?? (Put PlayerInfo[playerid] instead of put the all variables (PlayerInfo[playerid][xxx], PlayerInfo[playerid][xxa], PlayerInfo[playerid][xxb]), etc...) |
|
|
|
|
|
#4 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2010
Posts: 756
Reputation: 25
|
i dont think so
|
|
|
|
|
|
#5 | |
|
Little Clucker
![]() Join Date: Apr 2011
Posts: 45
Reputation: 0
|
Other people help please.
Quote:
|
|
|
|
|
|
|
#6 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Sep 2011
Posts: 967
Reputation: 278
|
Unless you want to loop through PlayerInfo and format a string/execute a query 100 or more times, then no, you can't do it.
|
|
|
|
|
|
#7 |
|
Little Clucker
![]() Join Date: Apr 2011
Posts: 45
Reputation: 0
|
|
|
|
|
|
|
#8 |
|
Little Clucker
![]() Join Date: Apr 2011
Posts: 45
Reputation: 0
|
Please help!
|
|
|
|
|
|
#9 |
|
Little Clucker
![]() Join Date: Apr 2011
Posts: 45
Reputation: 0
|
heeeeellpp meeeee
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Include] C-MySQL. (Advanced MySQL Account Configuration) | Carlton | Includes | 44 | 18/08/2012 08:19 AM |
| Strikens Mysql vs BlueG's Mysql plugin | PrawkC | Scripting Help | 4 | 30/09/2011 10:30 AM |
| Can't connect to local MySQL server through socket '/tmp/mysql.sock' | Ivan_Pantovic | Help Archive | 4 | 03/08/2011 01:50 PM |
| Mysql Move a record? (Mysql/pawn Question) | DarrenReeder | Help Archive | 4 | 05/11/2010 06:23 PM |