Mysql format
#8

Код:
	mysql_format(MySQLCon, mysqlquery, sizeof(mysqlquery), "UPDATE `accounts` SET `name` = '%e', `accent` = '%e', `password` = '%e'", PlayerInformation[playerid][pName], PlayerInformation[playerid][pAccent], PlayerInformation[playerid][pPassword]);
	mysql_format(MySQLCon, mysqlquery, sizeof(mysqlquery), "%s, `money` = '%d', `bank` = '%d', `health` = '%f', `armour` = '%f'", mysqlquery, PlayerInformation[playerid][pMoney], PlayerInformation[playerid][pBank], PlayerInformation[playerid][pHealth], PlayerInformation[playerid][pArmour]);
	mysql_format(MySQLCon, mysqlquery, sizeof(mysqlquery), "%s, `lastx` = '%f', `lasty` = '%f', `lastz` = '%f', `lasta` = '%f'", mysqlquery, PlayerInformation[playerid][pLastX], PlayerInformation[playerid][pLastY], PlayerInformation[playerid][pLastZ], PlayerInformation[playerid][pLastA]);
	mysql_format(MySQLCon, mysqlquery, sizeof(mysqlquery), "%s, `interior` = '%d', `world` = '%d'", mysqlquery, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
	
	mysql_format(MySQLCon, mysqlquery, sizeof(mysqlquery), "%s WHERE `uniqueid` = '%d'", mysqlquery, PlayerInformation[playerid][pUniqueID]);
Debug the code using printf after each mysql_format line by showing what is inside mysqlquery string (the query that you are sending) and you will understand.
Reply


Messages In This Thread
Mysql format - by Jack_Leslie - 06.03.2017, 07:04
Re: Mysql format - by JessThompson - 06.03.2017, 07:10
Re: Mysql format - by Jack_Leslie - 06.03.2017, 07:11
Re: Mysql format - by JessThompson - 06.03.2017, 07:12
Re: Mysql format - by Jack_Leslie - 06.03.2017, 07:15
Re: Mysql format - by JessThompson - 06.03.2017, 07:17
Re: Mysql format - by Jack_Leslie - 06.03.2017, 10:02
Re: Mysql format - by Unte99 - 06.03.2017, 10:11
Re: Mysql format - by Jack_Leslie - 06.03.2017, 10:17
Re: Mysql format - by Gammix - 06.03.2017, 12:26

Forum Jump:


Users browsing this thread: 1 Guest(s)