count rows in mysql with php with specific value -


I have the table name tb1

  tb1 ID Zone Pressure 1 India Yes 2 USA 3 UK Yes 4 India Yes 5 AUS No 6 Yup.  

Two types of presses such as "Yes" and "No" I need a result in this way

  Regional Pressure Yes India 2 USA 0 1 UK 1 1 Australia 0 1  

My efforts have been so far ...

MySql_query ("Selection area Tb1 Where pressure = 'yes' "); $ Num_rows = mysql_num_rows ($ result); Echo $ num_rows "\ N"; Selection area, SUM (pressure = 'yes') as 'yes',

This is an overall query here is a bella


Comments