Problem MYSQL Log
#2

Use mysql_format, instead of format.

pawn Код:
new string[200],query[1500];

mysql_format(mysql, string, sizeof(string),"UPDATE `cars` SET `cLocation` = %d, `cFaction` = %d, `cModel` = %d, `cLocationx` = %f, `cLocationy` = %f, `cLocationz` = %f, `cAngle` = %f, `cColorOne` = %d, `cColorTwo` = %d, `cOwner` = '%s', ", CarInfo[v][cLocation], CarInfo[v][cFaction], CarInfo[v][cModel], CarInfo[v][cLocationx], CarInfo[v][cLocationy], CarInfo[v][cLocationz], CarInfo[v][cAngle], CarInfo[v][cColorOne],CarInfo[v][cColorTwo], CarInfo[v][cOwner]);
strcat(query, string);

mysql_format(mysql, string, sizeof(string),"`cDescription` = '%s', `cValue` = %d, `cLicense` = '%s', `cRegistration` = %d, `cOwned`=%d, `cLock`=%d, `mod1`=%d, `mod2`=%d, `mod3`=%d, `mod4`=%d, `mod5`=%d, `mod6`=%d, ",CarInfo[v][cDescription],CarInfo[v][cValue],CarInfo[v][cLicense],CarInfo[v][cRegistration],CarInfo[v][cOwned],CarInfo[v][cLock],CarInfo[v][mod1],CarInfo[v][mod2],CarInfo[v][mod3],CarInfo[v][mod4],CarInfo[v][mod5], CarInfo[v][mod6]);
strcat(query, string);

mysql_format(mysql, string, sizeof(string),"`mod7`=%d, `mod8`=%d, `mod9`=%d, `mod10`=%d, `mod11`=%d, `mod12`=%d, `mod13`=%d, `mod14`=%d, `mod15`=%d, `mod16`=%d, `mod17`=%d, ",CarInfo[v][mod7],CarInfo[v][mod8],CarInfo[v][mod9],CarInfo[v][mod10],CarInfo[v][mod11], CarInfo[v][mod12],CarInfo[v][mod13],CarInfo[v][mod14],CarInfo[v][mod15],CarInfo[v][mod16], CarInfo[v][mod17]);
strcat(query, string);

mysql_format(mysql, string, sizeof(string),"`paintjob`=%d, `tNeon`=%d, `CT`=%d, `Assurance`=%d WHERE `ID`=%d", CarInfo[v][paintjob],CarInfo[v][tNeon],CarInfo[v][CT],CarInfo[v][Assurance], CarInfo[v][cID]);
strcat(query, string);

mysql_tquery(mysql, query);
Reply


Messages In This Thread
Problem MYSQL Log - by Cam972 - 26.07.2014, 02:47
Re: Problem MYSQL Log - by d3ll - 26.07.2014, 02:51
Re: Problem MYSQL Log - by Cam972 - 26.07.2014, 03:00
Re: Problem MYSQL Log - by Cam972 - 26.07.2014, 03:04
Re: Problem MYSQL Log - by Cam972 - 26.07.2014, 03:08
Re: Problem MYSQL Log - by Cam972 - 26.07.2014, 11:38

Forum Jump:


Users browsing this thread: 1 Guest(s)