Why is nothing sent to database?
#1

Can i ask why is nothing sent to database?
Theres everything set up already, except this part doesnt seem to work.

Код:
stock SaveDynamicDoor(doorid)
{
	new string[1024];
	format(string, sizeof(string), "UPDATE `ddoors` SET \
		`Description`='%s', \
		`CustomInterior`=%d, \
		`ExteriorVW`=%d, \
		`ExteriorInt`=%d, \
		`InteriorVW`=%d, \
		`InteriorInt`=%d, \
		`ExteriorX`=%f, \
		`ExteriorY`=%f, \
		`ExteriorZ`=%f, \
		`ExteriorA`=%f, \
		`InteriorX`=%f, \
		`InteriorY`=%f, \
		`InteriorZ`=%f, \
		`InteriorA`=%f,",
		g_mysql_ReturnEscaped(DDoorsInfo[doorid][ddDescription], MainPipeline),
		DDoorsInfo[doorid][ddCustomInterior],
		DDoorsInfo[doorid][ddExteriorVW],
		DDoorsInfo[doorid][ddExteriorInt],
		DDoorsInfo[doorid][ddInteriorVW],
		DDoorsInfo[doorid][ddInteriorInt],
		DDoorsInfo[doorid][ddExteriorX],
		DDoorsInfo[doorid][ddExteriorY],
		DDoorsInfo[doorid][ddExteriorZ],
		DDoorsInfo[doorid][ddExteriorA],
		DDoorsInfo[doorid][ddInteriorX],
		DDoorsInfo[doorid][ddInteriorY],
		DDoorsInfo[doorid][ddInteriorZ],
		DDoorsInfo[doorid][ddInteriorA]
	);

	format(string, sizeof(string), "%s \
		`CustomExterior`=%d, \
		`VIP`=%d, \
		`Family`=%d, \
		`Faction`=%d, \
		`Admin`=%d, \
		`Wanted`=%d, \
		`VehicleAble`=%d, \
		`Color`=%d, \
		`PickupModel`=%d, \
		`Pass`='%s', \
		`Locked`=%d WHERE `id`=%d",
		string,
		DDoorsInfo[doorid][ddCustomExterior],
		DDoorsInfo[doorid][ddVIP],
		DDoorsInfo[doorid][ddFamily],
		DDoorsInfo[doorid][ddFaction],
		DDoorsInfo[doorid][ddAdmin],
		DDoorsInfo[doorid][ddWanted],
		DDoorsInfo[doorid][ddVehicleAble],
		DDoorsInfo[doorid][ddColor],
		DDoorsInfo[doorid][ddPickupModel],
		g_mysql_ReturnEscaped(DDoorsInfo[doorid][dPass], MainPipeline),
		DDoorsInfo[doorid][dLocked],
		doorid+1
	); 

	mysql_function_query(MainPipeline, string, false, "OnQueryFinish", "i", SENDDATA_THREAD);
}
Reply
#2

First of all, check the mysql log. If nothing has been printed there, then you can make sure by printing the Query and executing it by phpMyAdmin.

pawn Код:
print(string);
mysql_function_query(MainPipeline, string, false, "OnQueryFinish", "i", SENDDATA_THREAD);
Copy the output and execute it to phpMyAdmin. If there's something wrong with it (either syntax error or invalid name for a field) then it will let you know.
Reply
#3

Alright, i figured it out. Again my stupidity won. Thanks Konstantinos for helping me once more.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)