01.01.2019, 13:43
Why do you need two queries? An INSERT is enough to insert the correct world. For some reason you have two columns `worldid` and `world` according to your code.
Second important note is that you may execute a query but you cannot be certain it was successful. This is the wrong way:
If the query fails for whatever reason, you destroyed them in-game but not on database. The correct way is:
This is also wrong:
No active cache.
Second important note is that you may execute a query but you cannot be certain it was successful. This is the wrong way:
pawn Code:
mysql_tquery(..., "DELETE ...");
WeedPlants[weedid][...] = 0;
pawn Code:
mysql_tquery(..., "DELETE ...", "OnWeedPlantsDeleted", "d", weedid);
pawn Code:
forward OnWeedPlantsDeleted(weedid);
public OnWeedPlantsDeleted(weedid)
{
WeedPlants[weedid][...] = 0;
}
pawn Code:
WeedPlants[weedid][ID] = cache_insert_id();