Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating relationships b/t tables with data from online form 1

Status
Not open for further replies.

mamasita60440

Programmer
Aug 4, 2006
16
US
I'm creating an online form connected to a MYSQL database. The database will have 4 tables (Handle, Load, Server, and Performance).

The database will be populated by information entered in the form. I want to create a relationship between
Handle-->Performance
Load--->Performance
Server-->Performance

In the performance table I included the primary keys for these tables, but I must do something more to create a relationship between these tables.

I have looked up join and I found that I can use the select command, but this seems more appropriate if the data is already in the tables.

With MS Access once I create a relationship between a table when a column is filled with data in one table it also updated in the other table can I do this with MYSQL?

Is this statement legal or is there something similar that will help me accomplish what I am trying to do?
alter table Performance add HandleID.Handle int(3);


Any help is appreciated. Thanks
 
In MySQL, as in any relational database, tables are independent entities; you don't create relationships between them (however, a table definition can refer to another table for referential integrity purposes, but that doesn't seem to be the issue here).

If you want a query to return results from more than one table, then you must use a join. However, if you want to hide the details of a join from end users, then you can define such a query as a view, and your users can query the view instead.
 
I have a page that displays output from a mysql query in a table. I added checkboxes to each row. If the checkboxes are checked when I click the submit button I would to take the data for just the rows that are checked and send that information to an excell spreadsheet.

The problem is I don't know how to say 'if the boxes are checked this is the data I want to use for...'

Does anyone have any suggestions? This is my first php project. Thanks.
 
This looks like a PHP question rather than a MySQL question. Try forum434

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top