[Pawn] Whats different with this 1 line and multi (MySQL) - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] Whats different with this 1 line and multi (MySQL) (/showthread.php?tid=788) |
Whats different with this 1 line and multi (MySQL) - Zow - 2019-09-16 Code: ?mysql_format(ourConnection, query, sizeof(query), "UPDATE characters SET pAdmin = %i, pLastSkin = %i, pLevel = %i, pEXP = %i, pMoney = %i, pBank = %i, pPaycheck = %i, pPhone = %i, pLastOnline = '%e', pLastOnlineTime = %i, pAdminjailed = %i, pAdminjailTime = %i WHERE char_dbid = %i", And Code: mysql_format(ourConnection, query, sizeof(query), "UPDATE characters SET pAdmin = %i, pLastSkin = %i, pLevel = %i, pEXP = %i, pMoney = %i, pBank = %i, pPaycheck = %i, pPhone = %i, pLastOnline = '%e', pLastOnlineTime = %i, pAdminjailed = %i, pAdminjailTime = %i \ Which one should I do? And why? RE: Whats different with this 1 line and multi (MySQL) - George - 2019-09-17 The difference is the number of queries. The second merges both but it has error in syntax (forgot , after the value of `pAdminjailTime ` column and before \ character). As for which one you should use, none of them. Update what is necessary when its value changes. How often does a player change skin, or their admin level is changed? You do not need to re-update all the time for values that change once in long time. RE: Whats different with this 1 line and multi (MySQL) - Zow - 2019-09-17 Thank you so much |