How To Save Player Stats On mysql-
#1

How can i save player stats or anything like
if i've added pDonator in PlayerInfo Enum How Can i Save This On Mysql databse?

i've a scritp there is other things saved
code

Код:
format(query,sizeof(query),"UPDATE playerdata SET LsResume = '%d',LsClass = '%d',LsTeam = '%d' WHERE UserName = '%s'",PlayerInfo[playerid][pResume],PlayerInfo[playerid][pClass],PlayerInfo[playerid][pTeam],PlayerInfo[playerid][pName]);
				mysql_query(query);
can any one teach me how can i save if i make new things?
Reply
#2

Either make a new table or create new columns and update your queries if your system is in use you might want to manually create the new columns then update your create table queries.
Reply
#3

Код:
format(query,sizeof(query),"UPDATE playerdata SET LsFishInventory = '%d'",PlayerInfo[playerid][pFishes]);
mysql_query(query);
i've made this according to old colums it will work? but its not working

How can i?
Reply
#4

The above will update for all the rows. Use it as the example of your first post and when you want to add a new field, add the field's name and its value to the query.
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
The above will update for all the rows. Use it as the example of your first post and when you want to add a new field, add the field's name and its value to the query.
aight, Konstantinos You Helped Me 100's of times thank you so much
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
The above will update for all the rows. Use it as the example of your first post and when you want to add a new field, add the field's name and its value to the query.
Not Working Bro

I want to Save LsFishInventory can u make it?
Reply
#7

please help
Reply
#8

whats wrong with this? why it won't save?

PHP код:
mysql_get_field("SfFishInventory",wdata);
PlayerInfo[playerid][pFishes] = strval(wdata); 
PHP код:
format(query,sizeof(query),"UPDATE playerdata SET SfFishInventory= '%d' WHERE UserName = '%s'",PlayerInfo[playerid][pFishes],PlayerInfo[playerid][pName]);
mysql_query(query); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)