5
Are you executing this code in response to a GET or a POST request? If GET, you'd need to use queryF instead of query. But you said that INSERT and UPDATE queries using similar code work, so maybe that's not the problem.
Print out some more info:
if(!$res) {
$intro_text .= "error: $query";
$errno = $xoopsDB->errno();
$error = $xoopsDB->error();
var_dump('after DELETE query', 'REQUEST_METHOD', $_SERVER['REQUEST_METHOD'], 'query', $query, 'errno', $errno, 'error', $error);
} else {
$intro_text .= "Record removed from DB!";
}