troubleshooting Question

what is mysql query (inner join query) for my following problem

Avatar of v s
v s asked on
* joinsMySQL ServerPHP
13 Comments4 Solutions128 ViewsLast Modified:
I want to display information of employee as per selected category. (also calculate no employees of that category).

At a time only one category will be selected from dropdown list .on selecting category , the corresponding categoryid will be recieved.
On the basis of that categoryid  i want to count no of empl0yees and fetch list of employees belong to that selected category only.

Four categories are there
 there are three tables
Category master (category will be selected from here) [CategoryId]
designationmaster [DesignationId] [Category]
employee master [Designation]

CategoryId = Category
 DesignationId = Designation

CategoryId  of  category master should be matched with Category field of designationmaster.

DesignationId of designationmaster should be matched with Designation field of employeemaster

RESULT OF MY QUERY SHOULD BE NUMBER OF EMPLOYEES CALCULATED FOR SELECTED CATEGORY (category is selected through dropdown list and categoryid is received through post method in next submitted page

Screenshots of tables are attached.emp.PNGdesignation_master.PNGcategory_master.PNG
Join our community to see this answer!
Unlock 4 Answers and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 4 Answers and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros