View Full Version : Mysql Query help
paaco
10-24-2008, 04:56 AM
What would I need to type to take all items with a recommended level over 60 out of loot tables completely. So they don't drop anywhere.
Sorry for the noob question but I can't seem to get it lol ;p
paaco
10-24-2008, 03:19 PM
Someone smart has to know ;p
spoon
10-24-2008, 04:04 PM
mysql> DELETE FROM `items` WHERE `reclevel` > 60;
edit: wait do you want JUST the loot tables?
spoon
10-24-2008, 04:05 PM
And if you want required:
mysql> DELETE FROM `items` WHERE `reqlevel` > 60;
spoon
10-24-2008, 04:16 PM
If you only want to remove them from the loot tables use:
to see what there are:
SELECT
`items`.`id`
FROM
`lootdrop_entries`
LEFT JOIN
`items`
ON `lootdrop_entries`.`item_id` = `items`.`id`
WHERE
`items`.`reclevel` > 60;
SELECT
`items`.`id`
FROM
`lootdrop_entries`
LEFT JOIN
`items`
ON `lootdrop_entries`.`item_id` = `items`.`id`
WHERE
`items`.`reqlevel` > 60;
to delete:
DELETE
`lootdrop_entries`
FROM
`lootdrop_entries`
LEFT JOIN
`items`
ON `lootdrop_entries`.`item_id` = `items`.`id`
WHERE
`items`.`reclevel` > 60;
and
DELETE
`lootdrop_entries`
FROM
`lootdrop_entries`
LEFT JOIN
`items`
ON `lootdrop_entries`.`item_id` = `items`.`id`
WHERE
`items`.`reqlevel` > 60;
AndMetal
10-25-2008, 12:22 AM
If you wanted to do both at the same time, you should be able to add an OR to the WHERE clause. Same with the SELECT query.
ChaosSlayer
10-25-2008, 01:15 AM
recommended level over 60
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.