Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 'high_priority, (SELECT COUNT(*) FROM tasks WHERE status = 'UPCOMING') AS ' at line 2 in C:\xampp\htdocs\voice-backend\test_query.php:4 Stack trace: #0 C:\xampp\htdocs\voice-backend\test_query.php(4): PDO->query('\r\n SELECT\r\n ...') #1 {main} thrown in C:\xampp\htdocs\voice-backend\test_query.php on line 4