The output of the mysql column has a specific value?

Good afternoon friends.
Please tell me.

There is a database, it has a certain table. The table has a certain column, nazavem his "Status"
When you register users, the value of this column is equal to = 0 when they are activated, the value is = 1

How to make display only inactive users in php.
For example, now have created a separate php file that wrote there code like this
<?php @mysql_connect('SERVER','NAME','PASSWORD');
@mysql_select_db('DATABASE NAME'); $result=mysql_query('SELECT * FROM
`TABLE`); while($row=mysql_fetch_array($result)) { echo
'<p--> '.$row['status'].'<p></p><br>'; } ?>

At the moment I outputs ones and zeros.
And it is necessary to have for example: "inactive users 5 (counts how many zeros, Saldivar and outputs the result)
Or simpler, just to a column output only zeros.

Please tell me how best to do.
September 19th 19 at 00:34
2 answers
September 19th 19 at 00:36
SELECT COUNT(*) as 'count' FROM `users` WHERE `status` = 0

PS. Your code is shit. Look in the direction of ORM or PDO
September 19th 19 at 00:38
Dog @ before the functions it is necessary to remove it silences error in important locations (DB connection) of the file to write whatever on the screen is not displayed.

Find more questions by tags PHPMySQL