vdgcine.com.br

Não foi possível exibir a página solicitada... por favor tente novamente!

SQLSTATE[42601]: Syntax error: 7 ERROR: EXIT cannot be used outside a loop, unless it has a label LINE 14: EXIT; ^ QUERY: DECLARE R CATEGORY%rowtype; FIELDS RECORD; V_ID INTEGER; I_OP ALIAS FOR $1; I_AUX ALIAS FOR $2; I_AUX2 ALIAS FOR $3; I_AUX3 ALIAS FOR $4; BEGIN IF(I_OP = 1) THEN IF(I_AUX2 IS NULL) THEN RETURN; EXIT; ELSE IF(I_AUX2 = 0) THEN IF(I_AUX IS NOT NULL) THEN FOR FIELDS IN SELECT * FROM CATEGORY CAT WHERE CAT.CAT_FK_TYPE = I_AUX AND CAT.CAT_FATHER_ID IS NULL ORDER BY CAT.CAT_ORDER, CAT.CAT_NAME LOOP R = FIELDS; V_ID = FIELDS.CAT_ID; RETURN NEXT R; FOR FIELDS IN SELECT * FROM SP_LIST_CATEGORY(1, I_AUX, V_ID, R.CAT_NAME || ' / ') SP LOOP R = FIELDS; RETURN NEXT R; END LOOP; END LOOP; ELSE FOR FIELDS IN SELECT * FROM CATEGORY CAT WHERE CAT.CAT_FATHER_ID IS NULL ORDER BY CAT.CAT_ORDER, CAT.CAT_NAME LOOP R = FIELDS; V_ID = FIELDS.CAT_ID; RETURN NEXT R; FOR FIELDS IN SELECT * FROM SP_LIST_CATEGORY(1, I_AUX, V_ID, R.CAT_NAME || ' / ') SP LOOP R = FIELDS; RETURN NEXT R; END LOOP; END LOOP; END IF; RETURN; ELSE IF(I_AUX IS NOT NULL) THEN FOR FIELDS IN SELECT * FROM CATEGORY CAT WHERE CAT.CAT_FK_TYPE = I_AUX AND CAT.CAT_FATHER_ID = I_AUX2 ORDER BY CAT.CAT_ORDER, CAT.CAT_NAME LOOP R = FIELDS; R.CAT_NAME = I_AUX3 || FIELDS.CAT_NAME; V_ID = FIELDS.CAT_ID; RETURN NEXT R; FOR FIELDS IN SELECT * FROM SP_LIST_CATEGORY(1, I_AUX, V_ID, R.CAT_NAME || ' / ') SP LOOP R = FIELDS; RETURN NEXT R; END LOOP; END LOOP; ELSE FOR FIELDS IN SELECT * FROM CATEGORY CAT WHERE CAT.CAT_FATHER_ID = I_AUX2 ORDER BY CAT.CAT_ORDER, CAT.CAT_NAME LOOP R = FIELDS; R.CAT_NAME = I_AUX3 || FIELDS.CAT_NAME; V_ID = FIELDS.CAT_ID; RETURN NEXT R; FOR FIELDS IN SELECT * FROM SP_LIST_CATEGORY(1, I_AUX, V_ID, R.CAT_NAME || ' / ') SP LOOP R = FIELDS; RETURN NEXT R; END LOOP; END LOOP; END IF; RETURN; END IF; END IF; END IF; END; CONTEXT: compilation of PL/pgSQL function "sp_list_category" near line 14


Rits_Application::run() /home/storage/8/87/7b/vdgcine/public_html/index.php [34]
Rits_Application::dispatch() /home/storage/8/87/7b/vdgcine/rits/_library/Rits/Application.php [105]
Zend_Controller_Front::dispatch() /home/storage/8/87/7b/vdgcine/rits/_library/Rits/Application.php [139]
Zend_Controller_Dispatcher_Standard::dispatch(object, object) /home/storage/8/87/7b/vdgcine/rits/_library/Zend/Controller/Front.php [954]
Zend_Controller_Action::dispatch(string) /home/storage/8/87/7b/vdgcine/rits/_library/Zend/Controller/Dispatcher/Standard.php [289]
Blog_DefaultController::listAction() /home/storage/8/87/7b/vdgcine/rits/_library/Zend/Controller/Action.php [513]
Blog_DefaultController::getListCategory() /home/storage/8/87/7b/vdgcine/rits/modules/blog/controllers/DefaultController.php [47]
Rits_Database_PreparedStatement::query() /home/storage/8/87/7b/vdgcine/rits/modules/blog/controllers/DefaultController.php [197]
PDOStatement::execute(array) /home/storage/8/87/7b/vdgcine/rits/_library/Rits/Database/PreparedStatement.php [128]
122                 $this->_stmt->bindValue($k$v);
123             }
124         }
125         
126         
// execute
127         if (! $this->_stmt->execute($bind)) {
128             throw new Rits_Database_Exception('Prepared statement error');
129         }
130         
131         
return $this->getResultSet($this->_stmt);
132     }