07.11.2016, 10:06
1) Splitting.
2) strcat
3) Zeex's compiler exceeds the line limit to 4095 characters:
https://github.com/Zeex/pawn
https://sampforum.blast.hk/showthread.php?pid=2768123#pid2768123
---
Notes:
- Consider updating to the latest versions of mysql plugin.
- Escape strings when needed.
- Use default values to reduce the query.
- Values' specifiers (only strings) need an apostrophe and not grave accent character. It will result in error in syntax.
pawn Код:
format(Query2,sizeof(Query2),
"INSERT INTO ...",
PN(playerid), string, ...);
pawn Код:
Query = "INSERT INTO `Users` (`Name`, ...)";
strcat(Query, " VALUES ('%s', ...)");
format(Query, sizeof(Query), Query, PN(playerid), string, ...);
https://github.com/Zeex/pawn
https://sampforum.blast.hk/showthread.php?pid=2768123#pid2768123
---
Notes:
- Consider updating to the latest versions of mysql plugin.
- Escape strings when needed.
- Use default values to reduce the query.
- Values' specifiers (only strings) need an apostrophe and not grave accent character. It will result in error in syntax.