uZhb
uZhb

Reputation: 19

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()

Upvotes: 1

Views: 3135

Answers (2)

PeterB
PeterB

Reputation: 2330

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.

Upvotes: 5

dfgdh
dfgdh

Reputation: 1

It cannot work, because

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

Here are three apostrophes

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

Upvotes: -1

Related Questions