0

Can Someone help me to solved my problem. How to count total of value base on dropdown?

for example

        <label for="gender">Gender</label>
          <select name="gender" id="dr" >
          <option value="" selected="selected">Select Your Gender</option>
          <option value="M">Male</option>
          <option value="F">Female</option>
        </select>

Than i want to know how many record in the database contains Male/Female. This Record will be automatically change when we select Male/Female From The Dropdown menu.The count value will show in the textfield.

i hope i have expert that can help me to solve my issue. :)

3
Contributors
3
Replies
15
Views
3 Years
Discussion Span
Last Post by pritaeas
0

Select count of male:

SELECT COUNT(*) FROM mydatatable WHERE gender = 'male'

and select count of female:

SELECT COUNT(*) FROM mydatatable WHERE gender = 'female'
0

Hi AndrisP,

That's for 1 by 1 right?
how about it count by dropdown menu?
i mean, when i select male from dropdown list, it will automatically show count value for male

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.