Jump to content

Subforms in PHP?


horaliar

Recommended Posts

Hi, I'm not sure if I already asked this question before in this forum, here goes:
I have an Access background, that's why I'm asking for subforms. I have a project involving the following database:

mysql> describe press_schedule;
+--------------+----------------------+------+-----+---------+----------------+
| Field        | Type                | Null | Key | Default | Extra          |
+--------------+----------------------+------+-----+---------+----------------+
| press_sch_id | smallint(5) unsigned | NO  | PRI | NULL    | auto_increment |
| press_date  | date                | YES  |    | NULL    |                |
| rgj_lst_pte  | datetime            | YES  |    | NULL    |                |
| rgj_prs_str  | datetime            | YES  |    | NULL    |                |
| rgj_prs_stp  | datetime            | YES  |    | NULL    |                |
| maint_str    | time                | YES  |    | NULL    |                |
| maint_stp    | time                | YES  |    | NULL    |                |
+--------------+----------------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)

mysql> describe press_schedule_sections;
+--------------+----------------------+------+-----+---------+-------+
| Field        | Type                | Null | Key | Default | Extra |
+--------------+----------------------+------+-----+---------+-------+
| press_sch_id | smallint(5) unsigned | NO  | PRI | NULL    |      |
| section_id  | smallint(5) unsigned | NO  | PRI | NULL    |      |
| lst_pte      | time                | YES  |    | NULL    |      |
| prs_str      | time                | YES  |    | NULL    |      |
| prs_stp      | time                | YES  |    | NULL    |      |
| prd_dte      | date                | YES  |    | NULL    |      |
+--------------+----------------------+------+-----+---------+-------+
6 rows in set (0.00 sec)

mysql> describe sections;
+--------------+----------------------+------+-----+---------+----------------+
| Field        | Type                | Null | Key | Default | Extra          |
+--------------+----------------------+------+-----+---------+----------------+
| section_id  | smallint(5) unsigned | NO  | PRI | NULL    | auto_increment |
| section_name | varchar(100)        | NO  |    | NULL    |                |
+--------------+----------------------+------+-----+---------+----------------+
2 rows in set (0.01 sec)

As you can see from the db structure, one record in press_schedule can have many records in press_schedule_sections associated with it. The same for sections. I'm fairly new to this area, so I'm completely at a lost as to how to even start creating a form that could accomplish this. I have done some other database driven applications, but none that involved the use of something like this. Can anyone give me some pointers? I'm very desperate for help, I'm the only one in my department that codes, and I really don't want to create this in Access. Thanks!
Link to comment
https://forums.phpfreaks.com/topic/28014-subforms-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.