title: How to count the number of people who choose a particular location?
body: <p>i need help in select sql statement.</p>
  
  <p>in my mysql database:</p>
  
  <p>location table</p>
  
  <pre><code>serialID(AI)|locations | telephone | address
  ---------------------------------------------
  1           | A       
  2           | B
  3           | C
  4           | D
  
  users table
  userID | location chosen
  -------------------------
  1      | A
  2      | B
  3      | B
  </code></pre>
  
  <p>I want to count the number of people who choose a particular location and display in the table. So if this particular location have more users choosen as their favourite location, it will move up to the first row. May I know how can I do this? </p>
  
  <p>something like this when it populate into dynamic table -></p>
  
  <pre><code>location | address | telephone | user's favourable
  B        |  -      | -         |  2
  A        |  -      | -         |  1
  C        |  -      | -         |  0
  D        |   -     | -         |  0
  </code></pre>