MySQL printing 0's?
#1

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.
Reply
#2

Maybe this is the problem? "playeird"
Reply
#3

That's not it, however, thank you for pointing it out.
Reply
#4

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, "", "");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)