$test = sprintf("SELECT * FROM `table` WHERE `text` LIKE '%%s%'", mysql_real_escape_string('test')); echo $test;
çıktı:
SELECT * FROM `table` WHERE `text` LIKE '%s
but it should çıktı:
SELECT * FROM `table` WHERE `text` LIKE '%test%'