System error

error:  DBD::mysql::db do failed: 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 '' at line 1 at /var/www/www.hunden.no/docs/cmp/blogg/removeAwsReference.cmp line 12.
context: 
... 
8:  my $sql = "UPDATE users SET $field = '' WHERE id = $uid";
9: 
10: 
11: 
12:  $dbh->do($sql);
13:  $m->comp('/cmp/misc/redirect.cmp', %ARGS, url => "/blogg/profil/$uid/");
14: 
15:  </%init>
16: 
code stack:  /var/www/www.hunden.no/docs/cmp/blogg/removeAwsReference.cmp:12
/var/www/www.hunden.no/docs/cmp/blogg/default.cmp:12
/var/www/www.hunden.no/docs/blogg/dhandler:1
/var/www/www.hunden.no/docs/blogg/autohandler:27
raw error






























DBD::mysql::db do failed: 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 '' at line 1 at /var/www/www.hunden.no/docs/cmp/blogg/removeAwsReference.cmp line 12.


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('DBD::mysql::db do failed: 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 \'\' at line 1 at /var/www/www.hunden.no/docs/cmp/blogg/removeAwsReference.cmp line 12.^J') called at /var/www/www.hunden.no/docs/cmp/blogg/removeAwsReference.cmp line 12
HTML::Mason::Commands::__ANON__('field', 'profile_banner') called at /usr/share/perl5/HTML/Mason/Component.pm line 138
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f446806a5f0)', 'field', 'profile_banner') called at /usr/share/perl5/HTML/Mason/Request.pm line 1305
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1295
HTML::Mason::Request::comp(undef, undef, 'field', 'profile_banner') called at /var/www/www.hunden.no/docs/cmp/blogg/default.cmp line 12
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 138
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f44806b0670)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1305
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1295
HTML::Mason::Request::comp(undef, undef) called at /var/www/www.hunden.no/docs/blogg/dhandler line 1
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 138
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f4476aa5bc8)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1300
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1295
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/share/perl5/HTML/Mason/Request.pm line 958
HTML::Mason::Request::call_next('MasonX::Request::WithApacheSession=HASH(0x7f4480962bb8)') called at /var/www/www.hunden.no/docs/blogg/autohandler line 27
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 138
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f4476aa6588)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1300
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1295
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/share/perl5/HTML/Mason/Request.pm line 484
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 484
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 436
HTML::Mason::Request::exec('MasonX::Request::WithApacheSession=HASH(0x7f4480962bb8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('MasonX::Request::WithApacheSession=HASH(0x7f4480962bb8)') called at /usr/local/share/perl/5.18.2/MasonX/Request/WithApacheSession.pm line 130
MasonX::Request::WithApacheSession::exec('MasonX::Request::WithApacheSession=HASH(0x7f4480962bb8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x7f44b0c53e60)', 'Apache2::RequestRec=SCALAR(0x7f44609d1a68)') called at (eval 54) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x7f44609d1a68)') called at -e line 0
eval {...} at -e line 0