Menu
I am having a small issue trying to the of fields in a column that = 1
Here is what I have table with the name ‘table’ a column in that table called ‘active’ this column has two values 0 or 1
I would like to be able to get the total number of 1’s in that column
here is what I have at the moment and its not working correctly. Could someone help point out what I am doing wrong
[code=php]
// Test Active Start
$testTotactive = “SELECT count(*) as total_active
FROM table
WHERE active=0”;
// Test Active End
Thank you