[PHP/SQL] Count rows?

Modo

blame it on my asd
May 27, 2013
137
42
Hi guys,

Just looking for code to count how many times "1" appears in the table "users" in column "online"?

I have tried
Code:
"SELECT COUNT(online) FROM users;"

AND

"select count(DISTINCT online) FROM users");

I know I need to put the "1" somewhere so it can look for it but I don't know where and I haven't used count before.
 

Users who are viewing this thread

Top