Join Tables using PHP and MYSQL
I am running into having a relational databases in my websites. Since I am new to PHP and MYSQL it is very time consuming learning all of the tricks of the trade. Currently I am building a lighting website that hase many lights but also have many sizes, finsihes and colors per light. Each light may have one or more of these colors or finishes so I would normally make this a relation in a database such as MS Access. I have gone away from MS Access to use MYSQL. It is my understaning that inorder to keep the realtion of the two tables (Lights, Finishes) in MSQL you need to code PHP to keep the relation. At this point this is way over my head, and I would love an extension to create this for me.
The extension would allow me to select 2 or more tables, identify their primary and foreign keys and then create a form. If the form was an update form the user could go in and modify the finishes or colors. When the user cliced the submit button the webpage would send the data back to the database updating the lighting table AND the finishes tables with the new information.
Example:
PK = Primary Key
FK = Foreign Key
Lighting table
l_autonumer (PK)
light_name
finish
color
size
cost
Finish table
f_autonumber (PK)
finish_name
l_autonumber (FK. PK from lighting table)
Size table
s_autonumber (PK)
width
height
extension
l_autonumber (FK, PK from lighting table)
and so forth..
The form would have this info:
light name (light table)
light number (light table)
light sizes (sizes table)
light finishes (finish table)
light price (light table)
submit
You guys are awesome. I also bought the php upload and it works great
Scott
Comments
Extension required
Extension Required for Join
I have two tables, each wiht a primary code called accountno. I need to combine these to extract fields from each to put onto a page. I need to join them by thier accountno.
One is called clientaccounts and the other weblinks333. Your help would be gratefully appreciated
aim@activ8.com Chris Green
Submitting a form
Explained properly
Couple of great extensions to handle all your SQL
You must me logged in to write a comment.