Ok, I now introduce the problem, I have 3 tables Company, CompanyName, Project. In Company i have many companies id and projects id, in CompanyName names of all companies, in Project have names of all project.
If you not understand i will give example,
Company: 1, 3; 5, 7; . . .CompanyName: 1, FirstName; 2 Secondname; 3 Thirdname; . . .Project: 1, Firstproject; 2, SecondProject; . . .
Result must be: Company name - Project name
- FirstName - Third project
- FifthName - Seventh project
But I don't know hot to get data from db like in the example Company name - Project name
I never do SQL query with 3 tables.
My bad you not understand the question ;(
See:
- Table
Companyhave 2 rows (3 but we need only 2):CompanyIDandProjectId - Table
CompanyNamehave 2 rows:IdandName - Table
Projecthave 2 rowsIdandName
In Table Company are only numbers for example CompanyID=3 and ProjectId=100
And I dont know, WHEN I HAVE CompanyID=3 and ProjectId=100 get data from CompanyName and Project and answer must be THEcompany3 = TheProject100.