MySQL issue
#3

Thanks it works.
I also got the same error with the furniture system. I get tihs bug whenever i buy a furniture and done placed the position for it i cant edit it again or delete it. It says i dont own any furniture.
Here is the stock
Код:
stock OnPlayerBuyFurniture(houseid, interior, world, furnitureslot, model, price, name[], Float:x, Float:y, Float:z)
{
	format(query, sizeof(query), "INSERT INTO `furnitures` (model, name, houseid, interior, virworld, marketprice, posx, posy, posz) VALUES (%d, '%s', %d, %d, %d, %d, %f, %f, %f)",
	model, name, HouseInfo[houseid][hID], interior, world, price, x, y ,z);
	mysql_function_query(dbHandle, query, true, "OnFurnitureInsert", "iiiiiis[128]fff", houseid, interior, world, furnitureslot, model, price, name, x, y, z);
	return 1;
}

stock OnPlayerEditedFurniture(playerid, furnitureslot, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
	format(query, sizeof(query), "UPDATE `furnitures` SET `posx` = %f, `posy` = %f, `posz` = %f, `posrx` = %f, `posry` = %f, `posrz` = %f WHERE `id` = %d",
	x, y, z, rx, ry, rz, FurnitureInfo[PlayerInfo[playerid][pHouseKey]][furnitureslot][fID]);
	mysql_function_query(dbHandle, query, true, "OnFurnitureUpdatePos", "iiffffff", playerid, furnitureslot, x, y, z, rx, ry, rz);
	return 1;
}

stock OnPlayerSellFurniture(playerid, houseid, furnitureslot)
{
	format(query, sizeof(query), "DELETE FROM `furnitures` WHERE `id` = %d", FurnitureInfo[houseid][furnitureslot][fID]);
	mysql_function_query(dbHandle, query, true, "OnPlayerSoldFurniture", "idd", playerid, houseid, furnitureslot);
	return 1;
}
P.S.
What version MySQL should i use to use cache?
Reply


Messages In This Thread
MySQL issue - by Tony$$ - 20.05.2015, 16:03
Re: MySQL issue - by Konstantinos - 20.05.2015, 16:05
Re: MySQL issue - by Tony$$ - 20.05.2015, 16:35
Re: MySQL issue - by rappy93 - 20.05.2015, 17:08
Re: MySQL issue - by Konstantinos - 20.05.2015, 18:05
Re: MySQL issue - by Tony$$ - 20.05.2015, 19:44
Re: MySQL issue - by Konstantinos - 20.05.2015, 19:53
Re: MySQL issue - by Tony$$ - 20.05.2015, 20:08

Forum Jump:


Users browsing this thread: 1 Guest(s)