Insert Data Into MySQL Using MySQLi and PDO The SQL query must be quoted in PHP. String values inside the SQL query must be quoted. Numeric values must not be quoted. The word NULL must not be quoted.