So I have this query:
DELETE inventory.* FROM `inventory` INNER JOIN item_instances ON item_instances.ID = inventory.instanceid
WHERE inventory.userid = '{$this->info['id']}' AND item_instances.itemid = '$itemid'
This works fine- the only problem is I want it to delete ONE row, but instead it deletes all rows matching the “where”. I tried adding LIMIT 1 but I get mysql error.
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LIMIT 1’ at line 2