mySQL safe problem
#8

Ok I'm having a similar problem now, except this time It is now the size of the Query array...

This works fine, a new file in the mysql database gets created:
Код:
stock SaveHouses(playerid, PHouseID, PHouseOwner[], Float:PX, Float:PY, Float:PZ, Virtual, Interior, HCost, HInt, HAdress[])
{
	new
	    aa = Virtual,
		ab =  Interior,
		bb = HCost,
		bc = HInt,
		cc = HAdress[256],
		Query[1024];
		//Query2[600];
		
	format(Query, sizeof(Query), "INSERT INTO `houses` (houseID, HouseOwner, hX, hY, hZ, Virtualworld, Interior) VALUES (%d, '%s', %f, %f, %f, %d, %d)",
	PHouseID, PHouseOwner, PX, PY, PZ, aa, ab);
	mysql_query(Query);
	//mysql_query(Query2);
	mysql_free_result();
	return 1;
}
And this doesn't work, while just one thing is added to the list of the format function, but no new files get created in the mysql database, all because of one extra thing.
Код:
stock SaveHouses(playerid, PHouseID, PHouseOwner[], Float:PX, Float:PY, Float:PZ, Virtual, Interior, HCost, HInt, HAdress[])
{
	new
	    aa = Virtual,
		ab =  Interior,
		bb = HCost,
		bc = HInt,
		cc = HAdress[256],
		Query[1024];
		//Query2[600];
		
	format(Query, sizeof(Query), "INSERT INTO `houses` (houseID, HouseOwner, hX, hY, hZ, Virtualworld, Interior, Cost) VALUES (%d, '%s', %f, %f, %f, %d, %d, %d)",
	PHouseID, PHouseOwner, PX, PY, PZ, aa, ab, bb);
	mysql_query(Query);
	//mysql_query(Query2);
	mysql_free_result();
	return 1;
}
Btw, can someone inform me about string sizes, because I read different things, like somewhere it said, the maximum could be 256, somewhere else it said it doesn't matter and the mysql gamemode from [leth4l] says Query[600], So I'm not sure what the maximum is.
Reply


Messages In This Thread
mySQL safe problem - by jesse237 - 13.02.2011, 11:56
Re: mySQL safe problem - by Luis- - 13.02.2011, 11:58
Re: mySQL safe problem - by jesse237 - 13.02.2011, 12:11
Re: mySQL safe problem - by Steve M. - 13.02.2011, 12:26
Re: mySQL safe problem - by jesse237 - 13.02.2011, 12:57
Re: mySQL safe problem - by Calgon - 13.02.2011, 13:00
Re: mySQL safe problem - by Steve M. - 13.02.2011, 16:56
Re: mySQL safe problem - by jesse237 - 17.02.2011, 16:36
Re: mySQL safe problem - by Hiddos - 17.02.2011, 16:40
Re: mySQL safe problem - by jesse237 - 17.02.2011, 16:42

Forum Jump:


Users browsing this thread: 1 Guest(s)