Nieuw lid |
|
Hallo allemaal,
Dit is mijn eerste bericht op dit forum. En ik vroeg me af of jullie me verder kunnen helpen met het volgende.
Ik heb een zend mvc implementatie staan en nu wil ik graag wat ingewikkeldere queries uitvoeren. Ik heb een query met meerdere joins die goed werkt als ik hem rechtstreeks op de mysql database run. Maar via Zend lukt het niet.
Hier is mijn code:
Vanuit de controller:
Plaatscode: 7787
class evenementen.php
Plaatscode: 7788
Dit is de foutmelding die ik krijg:
exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli prepare error: Operand should contain 1 column(s)' in /var/www/library/Zend/Db/Statement/Mysqli.php:85
Stack trace:
#0 /var/www/library/Zend/Db/Statement.php(109): Zend_Db_Statement_Mysqli->_prepare('SELECT `eveneme...')
#1 /var/www/library/Zend/Db/Adapter/Mysqli.php(330): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT `eveneme...')
#2 /var/www/library/Zend/Db/Adapter/Abstract.php(405): Zend_Db_Adapter_Mysqli->prepare('SELECT `eveneme...')
#3 /var/www/library/Zend/Db/Table/Abstract.php(1185): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Table_Select))
#4 /var/www/library/Zend/Db/Table/Abstract.php(1040): Zend_Db_Table_Abstract->_fetch(Object(Zend_Db_Table_Select))
#5 /var/www/application/models/evenementen.php(15): Zend_Db_Table_Abstract->fetchAll('SELECT * from e...')
#6 /var/www/application/controllers/EvenementController.php(55): evenementen->oneEvent('SELECT * from e...')
#7 /var/www/library/Zend/Controller/Action.php(502): EvenementController->allAction()
#8 /var/www/library/Zend/Controller/Dispatcher/Standard.php(293): Zend_Controller_Action->dispatch('allAction')
#9 /var/www/library/Zend/Controller/Front.php(914): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#10 /var/www/public/index.php(49): Zend_Controller_Front->dispatch()
#11 {main}
exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli prepare error: Operand should contain 1 column(s)' in /var/www/library/Zend/Db/Statement/Mysqli.php:85 Stack trace: #0 /var/www/library/Zend/Db/Statement.php(109): Zend_Db_Statement_Mysqli->_prepare('SELECT `eveneme...') #1 /var/www/library/Zend/Db/Adapter/Mysqli.php(330): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT `eveneme...') #2 /var/www/library/Zend/Db/Adapter/Abstract.php(405): Zend_Db_Adapter_Mysqli->prepare('SELECT `eveneme...') #3 /var/www/library/Zend/Db/Table/Abstract.php(1185): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Table_Select)) #4 /var/www/library/Zend/Db/Table/Abstract.php(1040): Zend_Db_Table_Abstract->_fetch(Object(Zend_Db_Table_Select)) #5 /var/www/application/models/evenementen.php(15): Zend_Db_Table_Abstract->fetchAll('SELECT * from e...') #6 /var/www/application/controllers/EvenementController.php(55): evenementen->oneEvent('SELECT * from e...') #7 /var/www/library/Zend/Controller/Action.php(502): EvenementController->allAction() #8 /var/www/library/Zend/Controller/Dispatcher/Standard.php(293): Zend_Controller_Action->dispatch('allAction') #9 /var/www/library/Zend/Controller/Front.php(914): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #10 /var/www/public/index.php(49): Zend_Controller_Front->dispatch() #11 {main}
|