if($limit== '400'){
$sql="SELECT * FROM report ORDER BY reportID ASC LIMIT $limit WHERE userID='$reportID'";}
says "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE userID='147'' at line 1"
.
Anybody who can help me. I'm a beginner in php programming language.