This PDO prepared statement returns false but does not throw an error

后端 未结 6 1709
[愿得一人]
[愿得一人] 2021-02-18 23:09

This code does not throw an error but the query fails, that is, the execute method returns false. How could that be?

require_once(\"Abstracts/DBMana         


        
6条回答
  •  遇见更好的自我
    2021-02-18 23:37

    It also happens when you use PDOStatement::bindValue() with PDO::PARAM_BOOL. Solution: just switch to PDO::PARAM_INT.

提交回复
热议问题