MySQL GİBİ + php sprintf

0 Cevap php
$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%'

0 Cevap