-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
neobeacon wrote:
> when using CRUDs,I want to generate page content from Zend_Db_Row object.To
> get the content from using id of the table (usng GET method) how to config
> the application.Please help me.Thank you
>
> I know how to call database & get the row ,view helpers and etc,
>
> I want to know how to set the action controller and especially when I typed
> /article/view/id/2 ,(as article/view?id=2) ,how to get the wanted result.
If you have your application set up with an article controller (in
controllers/ArticleController.php) containing a view action method
(called viewAction()) you get this for free with the default router.
In the action, you can access url parameters like:
$this->_getParam('id');
Will return the value of id (in the case of /article/view/id/2, it will
return "2")
- --
Brenton Alker
PHP Developer - Brisbane, Australia
http://blog.tekerson.com/
http://twitter.com/tekerson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkqcwSwACgkQ7bkAtAithusL6gCgsVrOcF15sJ8nYg6CVxcdgaxy
i9cAoNx738wA8lvOPtuyYqQUlL/V8LlH
=85st
-----END PGP SIGNATURE-----