I have a sql table formatted like this:
YES NO
1 0
0 1
1 0
and I'm trying to add up the yes and the no columns, then print the result. My current code looks like this:
$sql = "select sum(yes) from votes";
$sql = "select sum(no) from votes";
Any help?
EDITS: (responses to comments)
YES and NO are INT.
I get no error. It's just a blank screen.
I do not echo the results. The code above is the only code that has to do with this part.
$sqlvariable is only going to have the sum of "no"