19.06.2012, 04:02
I'm trying to delete a row with.
But it doesn't work at all.
pawn Код:
DELETE FROM Doors WHERE ID = 2
DELETE FROM Doors WHERE ID = 2
DELETE FROM `Doors` WHERE ID = 2
CMD:destroydoor(playerid, params[])
{
// ...
new id = strval(params);
DestroyDoor(id);
return 1;
}
public DestroyDoor(id)
{
new
string[128]
;
format(string, sizeof(string), "DELETE FROM `Doors` WHERE ID = %d", id);
// ...
db_query(Database, string);
return 1;
}
Not familiar with SQLite; does it have logs?
Try sending the query via phpMyAdmin and see what, if any, errors appear. EDIT: I bet it's caused by ID not being enclosed in ``, try that. |
Yea, it's the sa-mp native SQLite, and it doesn't have any support like the MySQL Plugin does. (OnQueryError etc...)
I tried sending the query on my Database editor, but it won't work. Also tried enclosing the collumn name with ` `, no result. |
DELETE FROM `Table` WHERE `ID` = 9
DELETE FROM `Table` WHERE `ID` = '9'