Hi,
Why using '1' in the line above?
return $this->getTable()->fetchAll('1')->toArray();
Use only:
return $this->getTable()->fetchAll()->toArray();
Firebird doesn't support queries like that:
select * from mytable where 1
mySQL do, SQLite maybe do to. Firebird NO.
Best regards.
De: "srayner02@googlemail.com" <srayner02@googlemail.com>
Para: kgbfernando@yahoo.com.br
Enviadas: Segunda-feira, 13 de Abril de 2009 7:52:22
Assunto: Res: Firebird Prepare Error
That's part of my problem, the stack trace only shows part of the SQL statement 'SELECT "GUESTBO..."'.
The table is called GUESTBOOK.
At this point i don't understand how the Zend Framework builds up the SQL statement. It looks wrong because i would be expecting to see something like 'SELECT somefields FROM GUESTBOOK'.
Following the stack trace backwards i assume this code in the model is responcible for getting the records,
with the fetchall function doing the work.
public function fetchEntries()
{
// we are gonna return just an array of the data since
// we are abstracting the datasource from the application,
// at current, only our model will be aware of how to manipulate
// the data source (dbTable).
// This ALSO means that if you pass this model
return $this->getTable()->fetchAll('1')->toArray();
}
I really need some way of dubugging this so that i can see the contents of the variables.
I am trying to get this all into Eclipse.
I have Eclipse with PDT and Zend Debugger installed, but i can't get the .htaccess rewrite commands to work inside eclipse.
Without debugging i am completly stuck.
Steve
Luiz Fernando-4 wrote:
>
> Please, send me the sql command.
>
>
>
>
> ________________________________
> De: srayner02 <srayner02@googlemail.com>
> Para: fw-db@lists.zend.com
> Enviadas: Domingo, 12 de Abril de 2009 8:24:04
> Assunto: [fw-db] Firebird Prepare Error
>
>
> I am completely new to Zend Framework, so please forgive my ignorance :-)
>
> Following the Quickstart tutorial, i am trying to adapt it to use a
> firebird
> database as opposed to SQLite.
>
> I have PHP_Interbase module loaded, and have added the ZendX firebird
> database adaptor.
>
> However i am getting a Firebird prepare error -104 unexpected end of
> command.
> This is my stack trace;
>
> #0 C:\www\Quickstart\library\Zend\Db\Statement.php(109):
> ZendX_Db_Statement_Firebird->_prepare('SELECT "guestbo...')
> #1 C:\www\Quickstart\library\ZendX\Db\Adapter\Firebird.php(341):
> Zend_Db_Statement->__construct(Object(ZendX_Db_Adapter_Firebird), 'SELECT
> "guestbo...')
> #2 C:\www\Quickstart\library\Zend\Db\Adapter\Abstract.php(432):
> ZendX_Db_Adapter_Firebird->prepare('SELECT "guestbo...')
> #3 C:\www\Quickstart\library\Zend\Db\Table\Abstract.php(1330):
> Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Table_Select))
> #4 C:\www\Quickstart\library\Zend\Db\Table\Abstract.php(1158):
> Zend_Db_Table_Abstract->_fetch(Object(Zend_Db_Table_Select))
> #5 C:\www\Quickstart\application\models\GuestBook.php(71):
> Zend_Db_Table_Abstract->fetchAll('1')
> #6 C:\www\Quickstart\application\controllers\GuestbookController.php(33):
> Model_GuestBook->fetchEntries()
> #7 C:\www\Quickstart\library\Zend\Controller\Action.php(503):
> GuestbookController->indexAction()
> #8 C:\www\Quickstart\library\Zend\Controller\Dispatcher\Standard.php(285):
> Zend_Controller_Action->dispatch('indexAction')
> #9 C:\www\Quickstart\library\Zend\Controller\Front.php(934):
> Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
> Object(Zend_Controller_Response_Http))
> #10 C:\www\Quickstart\public\index.php(48):
> Zend_Controller_Front->dispatch()
> #11 {main}
>
> Looking at the stack trace does it appear that i have everything in the
> right place?
> I'm just not sure how to proceed in diagnosing the problem.
>
> Any help much appreciated. (Let me know if i should post more info).
>
> Steve
> --
> View this message in context:
> http://www.nabble.com/Firebird-Prepare-Error-tp23010277p23010277.html
> Sent from the Zend DB mailing list archive at Nabble.com.
>
>
> Veja quais são os assuntos do momento no Yahoo! +Buscados
> http://br.maisbuscados.yahoo.com
>
Quoted from:
http://www.nabble.com/Firebird-Prepare-Error-tp23010277p23016319.html
Why using '1' in the line above?
return $this->getTable()->fetchAll('1')->toArray();
Use only:
return $this->getTable()->fetchAll()->toArray();
Firebird doesn't support queries like that:
select * from mytable where 1
mySQL do, SQLite maybe do to. Firebird NO.
Best regards.
De: "srayner02@googlemail.com" <srayner02@googlemail.com>
Para: kgbfernando@yahoo.com.br
Enviadas: Segunda-feira, 13 de Abril de 2009 7:52:22
Assunto: Res: Firebird Prepare Error
That's part of my problem, the stack trace only shows part of the SQL statement 'SELECT "GUESTBO..."'.
The table is called GUESTBOOK.
At this point i don't understand how the Zend Framework builds up the SQL statement. It looks wrong because i would be expecting to see something like 'SELECT somefields FROM GUESTBOOK'.
Following the stack trace backwards i assume this code in the model is responcible for getting the records,
with the fetchall function doing the work.
public function fetchEntries()
{
// we are gonna return just an array of the data since
// we are abstracting the datasource from the application,
// at current, only our model will be aware of how to manipulate
// the data source (dbTable).
// This ALSO means that if you pass this model
return $this->getTable()->fetchAll('1')->toArray();
}
I really need some way of dubugging this so that i can see the contents of the variables.
I am trying to get this all into Eclipse.
I have Eclipse with PDT and Zend Debugger installed, but i can't get the .htaccess rewrite commands to work inside eclipse.
Without debugging i am completly stuck.
Steve
Luiz Fernando-4 wrote:
>
> Please, send me the sql command.
>
>
>
>
> ________________________________
> De: srayner02 <srayner02@googlemail.com>
> Para: fw-db@lists.zend.com
> Enviadas: Domingo, 12 de Abril de 2009 8:24:04
> Assunto: [fw-db] Firebird Prepare Error
>
>
> I am completely new to Zend Framework, so please forgive my ignorance :-)
>
> Following the Quickstart tutorial, i am trying to adapt it to use a
> firebird
> database as opposed to SQLite.
>
> I have PHP_Interbase module loaded, and have added the ZendX firebird
> database adaptor.
>
> However i am getting a Firebird prepare error -104 unexpected end of
> command.
> This is my stack trace;
>
> #0 C:\www\Quickstart\library\Zend\Db\Statement.php(109):
> ZendX_Db_Statement_Firebird->_prepare('SELECT "guestbo...')
> #1 C:\www\Quickstart\library\ZendX\Db\Adapter\Firebird.php(341):
> Zend_Db_Statement->__construct(Object(ZendX_Db_Adapter_Firebird), 'SELECT
> "guestbo...')
> #2 C:\www\Quickstart\library\Zend\Db\Adapter\Abstract.php(432):
> ZendX_Db_Adapter_Firebird->prepare('SELECT "guestbo...')
> #3 C:\www\Quickstart\library\Zend\Db\Table\Abstract.php(1330):
> Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Table_Select))
> #4 C:\www\Quickstart\library\Zend\Db\Table\Abstract.php(1158):
> Zend_Db_Table_Abstract->_fetch(Object(Zend_Db_Table_Select))
> #5 C:\www\Quickstart\application\models\GuestBook.php(71):
> Zend_Db_Table_Abstract->fetchAll('1')
> #6 C:\www\Quickstart\application\controllers\GuestbookController.php(33):
> Model_GuestBook->fetchEntries()
> #7 C:\www\Quickstart\library\Zend\Controller\Action.php(503):
> GuestbookController->indexAction()
> #8 C:\www\Quickstart\library\Zend\Controller\Dispatcher\Standard.php(285):
> Zend_Controller_Action->dispatch('indexAction')
> #9 C:\www\Quickstart\library\Zend\Controller\Front.php(934):
> Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
> Object(Zend_Controller_Response_Http))
> #10 C:\www\Quickstart\public\index.php(48):
> Zend_Controller_Front->dispatch()
> #11 {main}
>
> Looking at the stack trace does it appear that i have everything in the
> right place?
> I'm just not sure how to proceed in diagnosing the problem.
>
> Any help much appreciated. (Let me know if i should post more info).
>
> Steve
> --
> View this message in context:
> http://www.nabble.com/Firebird-Prepare-Error-tp23010277p23010277.html
> Sent from the Zend DB mailing list archive at Nabble.com.
>
>
> Veja quais são os assuntos do momento no Yahoo! +Buscados
> http://br.maisbuscados.yahoo.com
>
Quoted from:
http://www.nabble.com/Firebird-Prepare-Error-tp23010277p23016319.html
Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes
没有评论:
发表评论