Here is my mysql table
Both Happy and Sad are INT and whenever one is chosen it puts a 1 into their column and nothing the in the other one.
I want to figure out either which row has had more entires (every time that option is chosen it adds a 1 to that row and nothing to the other) or at the very least how many entries have been to one of them (I just need to know if there are more sad's than happy's at the end of a month).
I have tried this code
if ($result = $mysqli->query("SELECT Negative FROM tablename")) {
/* determine number of rows result set */
$row_cnt = $result->num_rows;
printf("Result set has %d rows.\n", $row_cnt);
however this gives the error "expects parameter 1 to be resource boolean given"
Also tried mysql_numrows however it came up with the same error. Any idea how I could achieve this?