Sanitization of all the data used in queries

Hi,
Just pulling some patches to prevent SQL injections.
Furthermore, `mysql_real_escape_string` is deprecated; to be perfect, the code should be ported to PDO :- )

Regards.