I'm trying to get this to work but I have no idea what's wrong with it.
$sql = "SELECT * FROM $datatable ORDER BY ID ASC LIMIT $start_from,
$results_per_page WHERE STATE='$category'" ;
The following one works and just shows the entire table. But I'm running into issues when I try to use WHERE STATE=Variable
$sql = "SELECT * FROM ".$datatable." ORDER BY ID ASC LIMIT $start_from, ".$results_per_page ;