Hi,

I get strange output if I combine sprintf and mysql_real_escape_string. If I
do this the resulting into the database is \' not ' as I want.

mysql_query(sprintf("INSERT INTO table (value1, value2) VALUES (1, '%s')",
mysql_real_escape_string(" ' ")));

Should this be like this? Do the sprintf already add slashes or something?

/Peter

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to