search

Home  >  Q&A  >  body text

About setting error levels

$dsn = "mysql:host=localhost;dbname=lamp25;charset=utf8";

$pdo = new PDO($dsn, 'root', '123');

//Set error level

$pdo->setAttribute(3, 2);

##Can I ask about the previous paragraph? What are 3 and 2? Can you tell me in detail?

#The manual seems to be in English. . . .


我只是一条咸鱼哈我只是一条咸鱼哈2667 days ago1104

reply all(1)I'll reply

  • 呆呆熊去哪了

    呆呆熊去哪了2017-09-15 09:14:38

    $pdo->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); You can use static class constants like PDO::ATTR_CASE instead of numbers. It’s not clear what 3 and 2 are. It is more intuitive to write English letters.

    reply
    0
  • Cancelreply