SQL Problem
#1

Hello Guys,

I have a problem with the MYSQL-Plugin with Pawno the PAWN editor I can't write unlimited lines
but the MYSQL system needs it how I can it make other
here:
Код:
new mystr[256];
format (mystr,sizeof(mystr),
"Name='%s',Admin='%d',Kills='%d',Deaths='%d',Logins='%d',Freischaltung='%d',X='%f',Y='%f',Z='%f',CX='%f',CY='%f',CZ='%f',HX='%f',HY='%f',HZ='%f',Crashed='%d',Skin='%d',Polizist='%d',PolizeiSkin='%d',ADAC='%d',ADACSkin='%d'",
tname,
tadmin,
tkills,
tdeaths,
tlogins,
  tfrei,
  tx,
  ty,
  tz,
  tcx,
  tcy,
  tcz,
  thx,
  thy,
  thz,
  tcrash,
  tskin,
  tpolizei,
  tpolizeiskin,
  tadac,
  tadacskin);
  if (!InsertMySQL("tabelle",mystr)) {printf("Daten konnten nicht eingefьgt werden!");}
I want it so:
Код:
new mystr[256];
	format (mystr,sizeof(mystr),"Name='%s'",PlayerName(playerid));
	if (!InsertMySQL("tabelle",mystr)) {printf("Daten konnten nicht eingefьgt werden!");}
	format (mystr,sizeof(mystr),"Admin='%d'",Account[playerid][Admin]);
	if (!InsertMySQL("tabelle",mystr)) {printf("Daten konnten nicht eingefьgt werden!");}
I use this Plugin und this Include

http://www.downloads.realoa.de/Sonst...eandPlugin.rar

-Dedi

Reply
#2

No one can help me??
Reply
#3

If you are talking about a problem with the length, split it into multiple strings then put it into a string at the end.

E.g.

pawn Код:
new str[25][3], endstr[85];
format(str[0], 25, "Hi, how are you today?");
format(str[1], 25, "Good, how about you?");
format(str[2], 25, "Very well thank you.");
format(endstr, 85, "%s %s %s", str[0], str[1], str[2]);
Reply
#4

Its a good idea but if I have str1,str2,str3...str999 than I have the problem with to long lines again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)