Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

rockrgo

condição where no zend

Recommended Posts

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

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.