开发者

How to make PDO constant definitions available?

I'm using PDO to make an ODBC connection. Everything worked fine until, before a query, I inserted:

$myPDOcon开发者_运维百科nection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);

With that line in, I'm getting a 500 error on the AJAX call.

I think that somehow the PDO constants PDO::ATTR_ERRMODE and PDO::ERRMODE_SILENT are not being recognized.

I'm using IIS6 with the pre-compiled windows version of PHP 5.3. I did tell the set up program to include PDO extensions, and that's evidenced by the fact that the code works without the above line.

How can I ensure PHP recognizes those (and all) PDO constants? Is there something I can require?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜