Legacy mysql_query call includes request superglobals or concatenated variables in the SQL string.
Migrate to PDO or mysqli with prepared statements and bound parameters.