[Help] MySQL
#1

i'm busy trying to make a roleplay server with mysql. however im stuck.

Can somebody give me the code to get a value out of the database and than set it to the players money ammount

Please help me

i already have this but the results are not good

Код:
                        new string1[256];
	                new result1;
	                format(string1,sizeof(string1),"SELECT `cash` FROM `users` WHERE `username` = '%s' AND       `password` = '%s'",playername2, passnow);
					result1 = mysql_query(string1);
					new stores;
					stores = mysql_store_result(result1);
					new cash;
					new Field[64];
					ammount = mysql_fetch_row_format(Field, "|", stores);
					
					cash = mysql_free_result();
					format(string, sizeof(string), "Cash Loaded, you have $ %s", cash);
Reply


Messages In This Thread
[Help] MySQL - by Kastranova - 08.07.2010, 12:07
Re: [Help] MySQL - by Kastranova - 08.07.2010, 13:06

Forum Jump:


Users browsing this thread: 1 Guest(s)