I have a database and there is the column named 'status'. This column could contain five possible values. Now I need to sum number of rows, where the status column contains value 'canceled'. What function in the PHP I should use to count it, please? Thanks for response.
EDIT:
I think here's the complete solution. Correct me if I'm wrong.
$canceledsum=mysql_query("SELECT COUNT(*) AS totalcanceled FROM nabidka WHERE status='canceled'");
$d=mysql_fetch_assoc($canceledsum);
echo $d['totalcanceled'];