Tuesday, February 16, 2010

My Zend DB adapter syntax

I've following Zend Framework Documentation on Create a Model and Database Table. I'm doing initialize DB resource by command on document.


  1. % zf configure db-adapter \

  2. > 'adapter=PDO_SQLITE&dbname=APPLICATION_PATH "/../data/db/guestbook.db"' \

  3. > production

  4. A db configuration for the production has been written to the application config file.


  5. % zf configure db-adapter \

  6. > 'adapter=PDO_SQLITE&dbname=APPLICATION_PATH "/../data/db/guestbook-testing.db"' \

  7. > testing

  8. A db configuration for the production has been written to the application config file.


  9. % zf configure db-adapter \

  10. > 'adapter=PDO_SQLITE&dbname=APPLICATION_PATH "/../data/db/guestbook-dev.db"' \

  11. > development

  12. A db configuration for the production has been written to the application config file.
but it doesn't work for me, I've try to change and use ' to \" then it's works, yahooooo!

No comments:

Post a Comment