MySQL filling out values from other tables -


i have table called vacancy looks so

enter image description here

role company location each have table of there own query pull information other tables fill in vacancy

i tried

select  r.title, c.company, l.town, l.country, v.term role r, vacancy v, location l, company c 

but gives 300 rows of same title when should in fact have 3 rows returning.

company company

role role

location location

you can use join display data 4 tables

select v.id, r.title, c.company, l.town, l.country, v.term  vacancy v join  location l on (v.location = l.id) join   company c on (v.company = c.id) join  role r on (v.role = r.id) 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -