PDO::ATTR_EMULATE_PREPARES => false

Posted by user264058 on Stack Overflow See other posts from Stack Overflow or by user264058
Published on 2013-11-01T21:43:15Z Indexed on 2013/11/01 21:53 UTC
Read the original article Hit count: 277

Filed under:
|

I'm new to php and PDO ,so i read this response to a similar post->

Does PDO really not use prepared statements with mysql? Yes, by default (at least with version I tested) but native mode can be turned on manually. If not, can it be forced to do so By employing PDO::ATTR_EMULATE_PREPARES setting, the name is pretty self-explanatory. $dbh->setAttribute( PDO::ATTR_EMULATE_PREPARES, false ); should you do that? That's hardest question of them all. Well, I'd say - yes, you should. If you choose PDO as your db driver, there is no point in using it in the emulation mode. by YOUR COMMON SENSE

Aren't prepared statements secure from SQL injection, why change if from 'true'->false?? what is native mode??

© Stack Overflow or respective owner

Related posts about php

Related posts about pdo