2
first off - does it work when using $xoopsDB->queryF?
If so, then the problem is that you were trying to delete something from the database in a GET request and not a POST request. XOOPS has built in db protections to prevent most attacks that come from GET requests.
If it does not work, turn on MySQL debugging in System -> Preferences -> General Settings, then try your action again. You should get a popup window detailing every query in the current page, and if any queries were unable to complete they will be displayed in red and containing the error message for that query.