sendy Posted March 31, 2013 Share Posted March 31, 2013 Hi guys, i read about PDO in the book, then i read some PDO articles.. Most of the articles say that we should turn off PDO::ATTR_EMULATE_PREPARES if using MYSQL latest driver.. is this true? i searched some explanation why with recent mysql i should turn of PDO::ATTR_EMULATE_PREPARES, but unfortunately my newbie brain doesn't understand their explanation... all i know is PDO will send the query to the MYSQL when we use : $stmt = $pdo->prepare('query'); then PDO will send the data(placeholder's value) : $stmt->bindValue(':val', $value, PDO::PARAM_STR); $stmt->execute(); my mysql version : 5.x php version : 5.4 please guide me here , if possible with example codes Link to comment Share on other sites More sharing options...
Larry Posted April 1, 2013 Share Posted April 1, 2013 I would leave it enabled by default, just to be safe. Then, once your application is complete, do benchmarking with it on and off on your production machine in order to decide what to do for that machine. There are a lot of factors here, so there's no one right answer. Link to comment Share on other sites More sharing options...
Recommended Posts