Page 1 of 1

set PDO::ATTR_EMULATE_PREPARES to true or false?

Posted: Thu Apr 28, 2011 10:54 pm
by markthien
Hi guys,

I am using mysql 5.5 and php 5.3. I read this blog http://wezfurlong.org/blog/2006/apr/using-pdo-mysql/ saying that set it to true for better performance and etc. However, setting it to false can also prevent sql injection which describe here http://stackoverflow.com/questions/1314 ... statements.

If I wanna achieve both, what should I do ?

Cheers,
Mark