$sortAlgorithm = 'submissions.id * (submissions.upvote - submissions.downvote)';
Gives this erorr:
Warning: mysql_num_rows() expects parameter 1 to be resource
Which basically means the query is corrupt. However, if I change the * to a - it works fine:
$sortAlgorithm = 'submissions.id - (submissions.upvote - submissions.downvote)';
This is weird because this was working fine until just now when I tried upvoting a submission. I queried the database and all the ids, upvotes, and downvotes are numerical and not corrupt. Anyone have any ideas for why this is happening?