Using Relation Table with Zend Framework

intro
This article shows an example of usage of relation table with Zend Framework. You can download the source code of this article from here.
You can see the screens from the demonstration site.

1.Create bootstrap.php and config.ini
Create the file application/bootstrap.php with the following content.
Please modify yourBaseUrl properly.

Create the file application/config.ini with the following content.
Please modify database.params.* properly.

In this article, we will use the following sql.
2.Create Models
Create the file application/models/Projects.php with the following content.

Create the file application/models/ProjectsMembers.php with the following content.

Create the file application/models/forms/ProjectForm.php with the following content.

Create the file application/models/forms/ProjectMemberSubForm.php with the following content.
3.Create Controller
Create the file application/constorllers/ProjectController.php with the following content.
It extends My_Controller_Simple created before.
4.Create views
Create the file application/views/scripts/project/list.phtml with the following content.

Create the file application/views/scripts/project/detail.phtml with the following content.

Create the file application/views/scripts/project/form.phtml with the following content.

Create the file application/views/scripts/project/finish.phtml with the following content.

Create the file application/views/scripts/common/partList.phtml with the following content.

5.Check
Access the web server and check CRUD process of relation table.

2 Comments

  1. Hi,

    Any one can confirm that self::CASCADE ondelete , onupdate is working on Zend Framework? or any one can guide me that how can i do that?

    Thank you,
    K.Srinivasan

Leave a Reply

Your email address will not be published. Required fields are marked *