MySQL printing 0's? - 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)
+--- Thread: MySQL printing 0's? (
/showthread.php?tid=447943)
MySQL printing 0's? -
BigGroter - 02.07.2013
pawn Код:
GetPlayerName(playerid, pName, sizeof(pName));
format(szQuery, sizeof(szQuery), "UPDATE `Houses` SET `Owner` = '%s' AND `Owned` = %d WHERE `hID` = %d", pName, 1, hInfo[i][hID]);
mysql_function_query(dbHandle, szQuery, false, "thread_InsertHouse", "d", "playeird");
This prints owner as "0", same with "Owned", both 0's. Why?
Owner is a varchar(24) or something like that.
Re: MySQL printing 0's? -
NoahF - 02.07.2013
Maybe this is the problem? "playeird"
Re: MySQL printing 0's? -
BigGroter - 02.07.2013
That's not it, however, thank you for pointing it out.
Re: MySQL printing 0's? -
fordawinzz - 02.07.2013
pawn Код:
GetPlayerName(playerid, pName, sizeof(pName));
format(szQuery, sizeof(szQuery), "UPDATE `Houses` SET `Owner` = '%s',`Owned` = 1 WHERE `hID` = %d", pName, hInfo[i][hID]);
mysql_function_query(dbHandle, szQuery, false, "", "");