MySQL help
#1

Hello there, to start off I am using MySQL r33 by BlueG, yes I am aware this is older but I'm wondering why this code doesn't save

pawn Код:
format(query, sizeof(query), "UPDATE users SET Guarding=%d, GuardOffer=%d, GuardPrice=%d, FindingCar=%d, ActiveCrimeReport=%s, IsHacker=%d, LastSkin=%d, Rope=%d, Rags=%d WHERE NormalName='%s'", Player[playerid][Guarding],
        Player[playerid][GuardOffer], Player[playerid][GuardPrice], Player[playerid][FindingCar], Player[playerid][ActiveCrimeReport], Player[playerid][IsHacker], Player[playerid][LastSkin], Player[playerid][Rope], Player[playerid][Rags], pName);
pawn Код:
mysql_query(mysql, query);
And yes, there is a connection.
Reply
#2

Check mysql_tquery here https://sampwiki.blast.hk/wiki/MySQL/R33 good luck.
Reply
#3

If you're saving a string, you must put apostrophes around it:
pawn Код:
'%s'
Reply
#4

Thank you both. And if it helps SOME of the things do save (like AdminLevel) and I'll check on mysql_tquery I will report back with the results.
Reply
#5

MySQL R33 supports mysql_query it is similar to doing it like in R6, R5 and under
Reply
#6

Eventually mysql_format and mysql_tquery did the trick thanks a bunch everyone for all the help, this is one of the reasons why I love the SA:MP community.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)