Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1
This means you have a logical error somewhere. You are setting your result to be between -20 and 20, which can't be true. You'll have to start from 0.
$startResults = ($page - 1) * $resultsPerPage;
if $page isn't set, it'll default to 0. 0-1 = -1. -1 * 20 = -20.
Is that of any use to you?