I have a table name is tb1
tb1
id zone pressure
1 India Yes
2 USA No
3 UK Yes
4 India Yes
5 AUS No
6 UK Yes
Pressure have two kind of entry like "yes" and "no" i need result in this manner
Zone Pressure
Yes No
India 2 0
USA 0 1
UK 1 1
AUS 0 1
My effort so far...
$result = mysql_query("SELECT Zone FROM Tb1 WHERE Pressure = 'Yes'");
$num_rows = mysql_num_rows($result); echo $num_rows . " \n";
Pressure= 'Yes'"); $num_rows = mysql_num_rows($result); echo $num_rows . " \n";mysql_query. And stop respecting whoever told you to use it in the first place; it's been deprecated for a while now. Look into mysqli or PDO.