Application Error

exception 'Zend_Db_Exception' with message 'Error in SELECT `catalogo_articoli`.* FROM `catalogo_articoli` WHERE (id in (SELECT id1 as id FROM articoli2articoli WHERE id2= UNION SELECT id2 as id FROM articoli2articoli WHERE id1=)) AND (stato='attivo') ORDER BY `ordine` ASC: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT id2 as id FROM articoli2articoli WHERE id1=)) AND (stato='attivo') ' at line 1, query was: SELECT `catalogo_articoli`.* FROM `catalogo_articoli` WHERE (id in (SELECT id1 as id FROM articoli2articoli WHERE id2= UNION SELECT id2 as id FROM articoli2articoli WHERE id1=)) AND (stato='attivo') ORDER BY `ordine` ASC' in /var/www/clients/client0/web2/web/Taedo/Db/Table/Abstract.php:154 Stack trace: #0 /var/www/clients/client0/web114/web/application/models/Catalogo/Articolo.php(209): Taedo_Db_Table_Abstract->_fetch(Object(Taedo_Db_Table_Select)) #1 /var/www/clients/client0/web2/web/Zend/Db/Table/Abstract.php(1392): Catalogo_Articolo->_fetch(Object(Taedo_Db_Table_Select)) #2 /var/www/clients/client0/web114/web/application/models/Catalogo/Articolo.php(548): Zend_Db_Table_Abstract->fetchAll('id in (SELECT i...', 'ordine') #3 /var/www/clients/client0/web114/web/application/controllers/CatalogoController.php(130): Catalogo_Articolo->findCorr(NULL, 'articoli2artico...') #4 /var/www/clients/client0/web2/web/Zend/Controller/Action.php(516): CatalogoController->schedaAction() #5 /var/www/clients/client0/web2/web/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('schedaAction') #6 /var/www/clients/client0/web2/web/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 /var/www/clients/client0/web114/web/application/config.php(149): Zend_Controller_Front->dispatch() #8 /var/www/clients/client0/web114/web/public_html/index.php(20): include('/var/www/client...') #9 {main}