System error

error:  DBD::Pg::st execute failed: ERROR: syntax error at end of input
LINE 1: SELECT comdesc FROM formulari.comuni WHERE id=
^ [for Statement "SELECT comdesc FROM formulari.comuni WHERE id= "] at /opt/adep.heidix.net/htdocs/plant.html line 76.
context: 
... 
72:  % $sth->execute;
73:  % my @impianti = $sth->fetchrow_array();
74:  % $q2="SELECT comdesc FROM formulari.comuni WHERE id=$impianti[3] ";
75:  % my $sth2 = $dbh->prepare($q2);
76:  % $sth2->execute;
77:  % my @comune = $sth2->fetchrow_array();
78:  % $q3="SELECT c.comdesc FROM formulari.comuni c, impianti.comuni_serviti cs ";
79:  % $q3.="WHERE cs.id_impianto=$impianti[8] AND cs.id_comune=c.id ORDER BY comdesc ";
80:  % my $sth3 = $dbh->prepare($q3);
... 
code stack:  /opt/adep.heidix.net/htdocs/plant.html:76
/opt/adep.heidix.net/htdocs/autohandler:5
raw error






























DBD::Pg::st execute failed: ERROR:  syntax error at end of input
LINE 1: SELECT comdesc FROM formulari.comuni WHERE id= 
                                                       ^ [for Statement "SELECT comdesc FROM formulari.comuni WHERE id= "] at /opt/adep.heidix.net/htdocs/plant.html line 76.


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 125
HTML::Mason::Exceptions::rethrow_exception('DBD::Pg::st execute failed: ERROR:  syntax error at end of input^JLINE 1: SELECT comdesc FROM formulari.comuni WHERE id= ^J                                                       ^ [for Statement "SELECT comdesc FROM formulari.comuni WHERE id= "] at /opt/adep.heidix.net/htdocs/plant.html line 76.^J') called at /opt/adep.heidix.net/htdocs/plant.html line 76
HTML::Mason::Commands::__ANON__('RP', '') called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x559d59dbc5d0)', 'RP', '') called at /usr/share/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, 'RP', '') called at /opt/adep.heidix.net/htdocs/autohandler line 5
HTML::Mason::Commands::__ANON__('RP', '') called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x559d5a1744e0)', 'RP', '') called at /usr/share/perl5/HTML/Mason/Request.pm line 1300
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'RP', '') called at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x559d5a258aa0)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x559d5a258aa0)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x559d59eff4d8)', 'Apache2::RequestRec=SCALAR(0x559d5a2df318)') called at (eval 39) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x559d5a2df318)') called at -e line 0
eval {...} at -e line 0