rockrgo 138 Denunciar post Postado Abril 14, 2014 Boa tarde pessoal estou fazendo uma manutenção em uma aplicação zend porém não manjo muito da ferramenta, meu problema é o seguinte; tenho uma query com a seguinte condição where ->where($this->getAdapter()->quoteInto('subcategoriaID = ? AND visivel = 1', $s)); estou tentando implementar um OR nesta query da seguinte forma: ->where($this->getAdapter()->quoteInto('subcategoriaID = ? AND visivel = 1', $s)) ->orWhere($this->getAdapter()->quoteInto("ids_subcategorias REGEXP '[[:<:]] ? [[:>:]]' AND visivel = 1", $s)); porém o mesmo me retorna o seguinte erro An error occurred Application error Exception information: Message: No adapter for type NULL Stack trace: #0 C:\wamp\www\webcorestintas\application\modules\default\controllers\ProdutosController.php(96): Zend_Paginator::factory(NULL) #1 C:\wamp\www\webcorestintas\library\Zend\Controller\Action.php(516): Default_ProdutosController->subcategoriaAction() #2 C:\wamp\www\webcorestintas\library\Zend\Controller\Dispatcher\Standard.php(295): Zend_Controller_Action->dispatch('subcategoriaAct...') #3 C:\wamp\www\webcorestintas\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #4 C:\wamp\www\webcorestintas\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch() #5 C:\wamp\www\webcorestintas\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #6 C:\wamp\www\webcorestintas\public_html\index.php(26): Zend_Application->run() #7 {main} Request Parameters: array ( 'id' => '27-fitas', 'module' => 'default', 'controller' => 'produtos', 'action' => 'subcategoria', 'page' => '1', 'reqs' => array ( 'articleName' => '\\w+', 'page' => '\\d+', ), ) se eu coloco esta query direto no mysql ela me retorna os dados normalmente porém no zend não está rolando. Compartilhar este post Link para o post Compartilhar em outros sites
Thomas Piedade 21 Denunciar post Postado Abril 14, 2014 Se vc faz AND na primeira condição, por que não faz o OR também? Não manjo de zend tb :p Compartilhar este post Link para o post Compartilhar em outros sites
rockrgo 138 Denunciar post Postado Abril 14, 2014 Se você faz AND na primeira condição, por que não faz o OR também? Não manjo de zend tb :P já tentei também. Compartilhar este post Link para o post Compartilhar em outros sites
rockrgo 138 Denunciar post Postado Abril 15, 2014 Pelo que me parece o zend não está aceitando minha expressão regular....existe alguma função para tratar expressões no zend? Compartilhar este post Link para o post Compartilhar em outros sites