Jump to content

Help with linking database tables - Dreamweaver, MAC


ellaroc

Recommended Posts

I am working on a Mac. I have set up MAMP with phpmyadmin and mysql...

 

I am new at this but I fairly comfortable with phpmyadmin, and I can set up CRUD via Dreamweaver CS3 for individual table.

 

But, I have 2 tables that need to be linked...I think.  Perhaps not - I don't know really.

 

I have 2 tables: (`position` is how I am ordering my list - `position_id` is the relationship column for the POSITION table below)

 

MOVIES TABLE

`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,

`position` INT( 11 ) NOT NULL ,

`section` VARCHAR( 20 ) NOT NULL ,

`date` VARCHAR( 10 ) DEFAULT NULL ,

`heading` VARCHAR( 100 ) CHARACTER SET utf8 DEFAULT NULL ,

`crying_room` VARCHAR( 10 ) DEFAULT NULL ,

`title` VARCHAR( 100 ) CHARACTER SET utf8 DEFAULT NULL ,

`rating` VARCHAR( 5 ) CHARACTER SET utf8 DEFAULT NULL ,

`minutes` INT( 3 ) DEFAULT NULL ,

`times` TEXT CHARACTER SET utf8,

`descShort` TEXT CHARACTER SET utf8,

`descLong` TEXT CHARACTER SET utf8,

`official_site` VARCHAR( 100 ) CHARACTER SET utf8 DEFAULT NULL ,

`image` VARCHAR( 30 ) CHARACTER SET utf8 DEFAULT NULL ,

PRIMARY KEY (  `id` )

 

POSITION TABLE

`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,

`position_id` INT( 11 ) NOT NULL ,

`position` INT( 11 ) NOT NULL ,

`section` VARCHAR( 20 ) NOT NULL ,

`date` VARCHAR( 10 ) DEFAULT NULL ,

`heading` VARCHAR( 100 ) CHARACTER SET utf8 DEFAULT NULL ,

`crying_room` VARCHAR( 10 ) DEFAULT NULL ,

`title` VARCHAR( 100 ) CHARACTER SET utf8 DEFAULT NULL ,

`rating` VARCHAR( 5 ) CHARACTER SET utf8 DEFAULT NULL ,

`minutes` INT( 3 ) DEFAULT NULL ,

`times` TEXT CHARACTER SET utf8,

`descShort` TEXT CHARACTER SET utf8,

`descLong` TEXT CHARACTER SET utf8,

`official_site` VARCHAR( 100 ) CHARACTER SET utf8 DEFAULT NULL ,

`image` VARCHAR( 30 ) CHARACTER SET utf8 DEFAULT NULL ,

PRIMARY KEY (  `id` )

 

I would like to know if there is an extension manager for this or the best way to go about this using default tools in Dreamweaver.

 

But, as mentioned I may not need two tables.  This is what I really need.

 

An admin section that basically has all the CRUD on the same page.  I think I will need some JavaScript for this but I am not too good with Java.

 

First, the set up - I am using the position and section labels in the POSITION table to help me filter data to specific areas on my web site.

 

The MOVIES table will have an add form so that movies can be added to the table (this is done).  This table is only to be used for updating the position table. There will need to be a delete link (which I think I can do) or an archive table which would be handy.

 

1. I would like to set up a list (master?) of the movies showing 3 columns: position, section, title

2. The position column (repeat region) would have a hover effect with the all detail popping out or expanding below the row

3. The title column (repeat region) would have a drop down list so that the movie and all its data can be moved to another position

 

Maybe this can be done with one table and the information just moved around.

 

That's basically it. 

 

Thank you,

Michelle

Yes. Specifically I need to fill my position table with data in the movies table.  So I need to know how to create a form that auto fills where I select from a list of titles, the form auto fills and then I can connect it with a specific position in the position table.

 

Thank you for you reply.

 

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.