troubleshooting Question

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

Avatar of v s
v s asked on
PHPMySQL Server* joins
13 Comments1 Solution128 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
DRDS
DRTC
ADMIN
ALLIED
 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 the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
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 1 Answer 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