Utilize MySQLi escape string functionality instead of MySQL's.

If you're using the MySQLi extension, you should stick with it when escaping strings instead of using mysql_real_escape_string. In some environments, mysql_real_escape_string would fail in this situation because you don't have an active MySQL connection (just a MySQLi one).
Merge pull request #1 from Adduc/patch-1

Utilize MySQLi escape string functionality instead of MySQL's.