System error

error:  DBD::mysql::st execute 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 'AND published IS NOT NULL
ORDER BY id DESC
LIMIT 100' at line 6 at /var/www/www.hunden.no/docs/cmp/blogg/list_archive.cmp line 141.
context: 
... 
137: 
138: 
139: 
140:  $sth = $dbh->prepare($sql);
141:  $sth->execute() or die $DBI::errstr;
142:  my $default;
143:  my $rows = $sth->rows;
144: 
145: 
... 
code stack:  /var/www/www.hunden.no/docs/cmp/blogg/list_archive.cmp:141
/var/www/www.hunden.no/docs/cmp/blogg/default.cmp:60
/var/www/www.hunden.no/docs/blogg/dhandler:1
/var/www/www.hunden.no/docs/blogg/autohandler:27
raw error






























DBD::mysql::st execute 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 'AND published IS NOT NULL
ORDER BY id DESC
LIMIT 100' at line 6 at /var/www/www.hunden.no/docs/cmp/blogg/list_archive.cmp line 141.


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('DBD::mysql::st execute 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 \'AND published IS NOT NULL^J^IORDER BY id DESC^J^ILIMIT 100\' at line 6 at /var/www/www.hunden.no/docs/cmp/blogg/list_archive.cmp line 141.^J') called at /var/www/www.hunden.no/docs/cmp/blogg/list_archive.cmp line 141
HTML::Mason::Commands::__ANON__('uid', undef, 'type', 'published') called at /usr/share/perl5/HTML/Mason/Component.pm line 138
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f44681a2208)', 'uid', undef, 'type', 'published') 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, 'uid', undef, 'type', 'published') called at /var/www/www.hunden.no/docs/cmp/blogg/default.cmp line 60
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 138
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f448428afa8)') 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(0x7f447c2312d8)') 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(0x7f445c742fa8)') 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(0x7f44842ac080)') 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(0x7f445c742fa8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('MasonX::Request::WithApacheSession=HASH(0x7f445c742fa8)') called at /usr/local/share/perl/5.18.2/MasonX/Request/WithApacheSession.pm line 130
MasonX::Request::WithApacheSession::exec('MasonX::Request::WithApacheSession=HASH(0x7f445c742fa8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x7f4488237698)', 'Apache2::RequestRec=SCALAR(0x7f4460506708)') called at (eval 54) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x7f4460506708)') called at -e line 0
eval {...} at -e line 0