how to show more than one foreign key values rather than their id's in

Avatar
  • Answered
One of my table (user) contains 2 foreign keys named as (designation_id from designation table) and (department_id from department table),while view my (table user),the foreign key id's show.I want these foreign keys value rather than id while viewing the (table user).I wrote this query but it does not work and this query works only when i just want the only one foreign key value either it is (designation_id from designation table) or (department_id from department table) but not work on both.So what did i do?
SELECT user_id,user_name,address,phone_no,designation.designation_id,grade,registration,department.dept_id ,designation.designation,department.department
FROM user
LEFT JOIN designation and department
ON user.designation_id = designation.designation_id,
ON user.dept_id = department.dept_id;
Avatar
Scott
Hello,

Thank you for your question regarding foreign keys today. What tool are you using to view the table and keys? Can you provide a link to a screenshot of what you are experiencing? Also, please list as many steps as possible to allow us to duplicate the issue for you. I cannot locate an account on our server with any information provided, so we will need to try and duplicate the situation as best as we can from our test server. Please let us know if you have any further questions.

Kindest Regards,
Scott M