Mysql error
#2

With your query which you have

pawn Код:
format(query,sizeof(query), "INSERT INTO `houses` `HouseX`=%f, `HouseY`=%f, `HouseZ`=%f, `HouseInterior`=%i, `HouseValue`=%i, `SalePrice`=%i, `VehicleSlots`=%i, `HouseOwner`='%s', `HouseOwned`='%s', `HouseRegion`='%s'", hInfo[slot][HouseX], hInfo[slot][HouseY], hInfo[slot][HouseZ], hInfo[slot][HouseInterior], hInfo[slot][HouseValue], hInfo[slot][SalePrice], hInfo[slot][VehicleSlots], hInfo[slot][HouseOwner],hInfo[slot][HouseOwned],GetPlayerArea(playerid));
    mysql_query(dbHandle, query);

You need to first declare which table you are inserting into, in which you have done, then use brackets before listing each row/column, before then stating the values that will be stored in each of those rows.
For example
pawn Код:
format(query,sizeof(query), "INSERT INTO `houses` (`HouseX`, `HouseY`, `HouseZ`, `HouseInterior`, `HouseValue, `SalePrice`, `VehicleSlots, `HouseOwner`, `HouseOwned`, `HouseRegion`) VALUES('%f', '%f', '%f', '%i', '%i', '%i', '%i', '%s', '%s', '%s')", hInfo[slot][HouseX], hInfo[slot][HouseY], hInfo[slot][HouseZ], hInfo[slot][HouseInterior], hInfo[slot][HouseValue], hInfo[slot][SalePrice], hInfo[slot][VehicleSlots], hInfo[slot][HouseOwner],hInfo[slot][HouseOwned],GetPlayerArea(playerid));
    mysql_query(dbHandle, query);
Reply


Messages In This Thread
Mysql error - by thegamer355 - 08.09.2015, 18:03
Re: Mysql error - by LiamM - 08.09.2015, 18:15
Re: Mysql error - by Stev - 08.09.2015, 18:17
Re: Mysql error - by thegamer355 - 08.09.2015, 18:26
Re: Mysql error - by thegamer355 - 09.09.2015, 10:14
Re: Mysql error - by Vince - 09.09.2015, 10:26

Forum Jump:


Users browsing this thread: 1 Guest(s)