PHP Using PHP with MySQL Querying the Database with PHP Querying the Database

James Barrett
James Barrett
13,252 Points

What exactly is setAttribute() doing in this code?

$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

What exactly is this code doing to the program? I a struggling to understand Randy's explanation.

Thanks, James.

1 Answer