counting votes
Posted: Thu Jun 29, 2006 1:54 am
I have table named votes and there is a field "cnt" in it where votes are casted. i want to count all votes against all entries? how can i do so?
thanks.
thanks.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
SELECT COUNT(`cnt`) as `total` FROM `votes` GROUP BY `cnt`Code: Select all
SELECT SUM(`cnt`) as Total FROM `votes`