How does domainfactory handle the mysql_real_escape_string function automatically?

Domainfactory automatically handles the mysql_real_escape_string function by using prepared statements with parameterized queries. This method helps prevent SQL injection attacks by automatically escaping special characters in user input before executing the query.

$stmt = $pdo->prepare('INSERT INTO table_name (column1, column2) VALUES (:value1, :value2)');
$stmt->bindParam(':value1', $value1);
$stmt->bindParam(':value2', $value2);
$stmt->execute();