Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • SQLSTATE[IM001]: Driver does not support this function: This driver doesn't support setting attributes...Why is it never so simple for me :) While I'm sure this will get most people there, in my case I ended up having to use something similar to the accepted answer. Just a heads up to future readers! Commented May 8, 2014 at 21:36
  • @MatthewJohnson what driver it is? Commented May 9, 2014 at 5:35
  • I'm not sure, but in the manual it says PDO::ATTR_EMULATE_PREPARES Enables or disables emulation of prepared statements. Some drivers do not support native prepared statements or have limited support for them. It's a new one to me, but then again I'm just getting started with PDO. Usually use mysqli, but figured I'd try to broaden my horizons. Commented May 9, 2014 at 13:49
  • @MatthewJohnson if you are using PDO for mysql, driver does support this function all right. So, you are getting this message due to some mistake Commented May 9, 2014 at 14:07
  • 1
    If you got driver support problem message, check again if you call setAttribute for the statement($stm, $stmt) not for the pdo object. Commented Dec 21, 2016 at 6:44