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*

5
  • 9
    How does that answer the OPs question? Commented Sep 18, 2015 at 9:25
  • 11
    @NaijaProgrammer id doesn't, but it could lead him/her to find the answer based on the error reporting suggested by "Your Common Sense" .. Commented Sep 18, 2015 at 10:16
  • @Your Common Sense : a new one on me, same issue. Root cause was setting the ATTR_EMULATE_PREPARES option in the options when creating the PDO object. Breaks in production (php 7.2.8), works in dev (php 7.2.34) !!! It is the setting of the option (not the value of the option being set) that caused a random fail in some cases. Commented Dec 22, 2020 at 14:10
  • I am facing same problem.. Ever code expect one update statement not working and not showing the error.. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); is already in my code Commented May 12, 2022 at 12:47
  • @AMALBENNY there is entire answer above, not just one line with PDO::ATTR_ERRMODE Commented May 12, 2022 at 13:15