开发者

mysql_real_escape_string For doctrine (symfony)?

Is there mysql_real_escape_string for doctrine?

Because I have a query like

开发者_运维问答
?´## '´` ^#11 " dfvü:?=._`ßß?(%%/ '

and i must escape it, before i give it to Doctrine_Query::create()


Doctrine handles escaping internally. Use a query like:

$q = Doctrine_Query::create()->from('MyTable m')->where('m.column = ?', '?´## \'´^#11 " dfvü:?=._ßß?(%%/');

And the characters will be escaped to be safe for your database.


It cannot work, because

where('m.column = ?', '?´## '´^#11 " dfvü:?=._ßß?(%%/');

Here are three apostrophes

'?´## '´^#11 " dfvü:?=._ßß?(%%/'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜