i got a simple instruction like this:
$db = Zend_Db_Table::getDefaultAdapter();
$select = $db->select();
$select
->from(array("b" => "barcos"))
->join(array("i" => "imagens"), 'b.id = i.barcoId')
->where("b.id = {$idEmbarcacao}")
->group("i.barcoId");
$this->view->anuncio = $db->fetchRow($select);
and it returns this error
Message: SQLSTATE[42000]: Syntax error or access violation: 1064 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
it is driving me crazy, because only in this particular page it returns this error, in some other pages it is fine. My database is correctly populated. it shoud return something but a error. Thanks in advance.