You could just add OR to the query to add an additional item, or you could create a script-based query to delete an array of items; here is the former:
DELETE FROM `inventory` WHERE `id` = '7179' OR `id` = '909';
DELETE FROM `cart_inventory` WHERE `id` = '7179' OR `id` = '909';
DELETE FROM `storage` WHERE `id` = '7179' OR `id` = '909';
DELETE FROM `guild_storage` WHERE `id` = '7179' OR `id` = '909';
You can load this script and it will (in theory) automatically delete all the items from the array .@item_id from player inventories and storages, regardless of whether or not they are online; this is untested:
- script delete_all -1,{
OnInit:
// List of item IDs to delete
setarray .@item_id[0], 909, 910, 911;
// Build list of account IDs
query_sql "SELECT `account_id` FROM `login`", .@account_id;
// Loop for each account
for (.@i = 0; .@i < getarraysize(.@account_id); .@i++) {
// Loop for each item
for (.@j = 0; .@j < getarraysize(.@item_id); .@j++) {
// Check if account is logged in
if (isloggedin(.@account_id[.@i])) {
// Delete items from online player inventory
attachrid .@account_id[.@i];
delitem .@item_id[.@j], countitem(.@item_id[.@j]);
detachrid;
}
}
}
// Loop for each item
for (.@i = .@j = 0; .@i < getarraysize(.@item_id); .@i++) {
// Delete items from all inventories/storages
query_sql "DELETE FROM `inventory` WHERE `id` = '"+ .@item_id[.@i] +"'";
query_sql "DELETE FROM `cart_inventory` WHERE `id` = '"+ .@item_id[.@i] +"'";
query_sql "DELETE FROM `storage` WHERE `id` = '"+ .@item_id[.@i] +"'";
query_sql "DELETE FROM `guild_storage` WHERE `id` = '"+ .@item_id[.@i] +"'";
// Build list of item names
.@item_name$[.@j++] = getitemname(.@item_id[.@i]);
}
// Announce deleted items
announce "The following items have been deleted: "+ implode(.@item_name$, ", "), bc_all;
end;
}