in reply to $dbh->errstr;

Well for starters you need to save the statement handler returned by prepare and call it's execute method. You don't get an error because there is no error. Prepare built the statment handle fine, you just didn't use it.
my $sth = $dbh->prepare("UPDATE items SET users='$xObdh|user=$mainuser +id=$qat' WHERE id = '$id'") or die $dbh->errstr; $sth->execute() or die $dbh->errstr;

Secondly, you should be using placeholders. Get in the habit of using them now. It will save you effort later. With placeholders you can cache prepared statements for performance and they will always do the right thing when quoting values, making your code simpler.

-pete
"Pain heals. Chicks dig scars. Glory lasts forever."