Fatal error: Uncaught mysqli_sql_exception: 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
1 = 1 AND t.type_id = 4
...' at line 21 in /var/www/html/workings.php:319
Stack trace:
#0 /var/www/html/workings.php(319): mysqli->query('SELECT \n ...')
#1 {main}
thrown in /var/www/html/workings.php on line 319