0

Hi i am a beginner in php and mysql....
I have a made a database for registration of a customer in shrare market....

Now what i want to show at the front end is the the person who is entering information has a choice to select from a company through a drop down menu from the table i made "Company" i have predefined values in the Table company. .

Now i want to relate "Compnayname" from Company with "ShareRate" from Company .

In general words when a person selects the Company Name such as "Microsoft " from dropdown list then in the next text field ....the ShareRate is shown itself taken from the fixed value in my DB.

please any person post ur ideas or query. or any tutorial link for that matter.

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Fest3er
0

In order to relate two tables of information, you need a value that ties them together, a value that is the same in each. If you give each company in the CompanyName table a unique ID, you then store those ID values in the ShareRate table with records containing containing respective companies' share rates. Thus, when you fetch rows of data from the ShareRate table, you then use the ID column to fetch the corresponding company name from the other table. This will work whether you are relating two tables in one database or you are relating tables in different databases.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.