in reply to Re: A more elegant solution?
in thread A more elegant solution?

Not alway legal.

Accourding the the databases I use, SET is only allowd in an UPDATE statement.

You should definitely always use $dbh->quote() insted of just adding '-characters. The latter will fail if the string contains any 's (if you get my meaning).