MCQs > IT & Programming > PHP > To set PDO to raise exceptions, Database errors occur you can use the PDO::SetAttribute method to set your PDO object’s error mode as follows?

PHP MCQs

To set PDO to raise exceptions, Database errors occur you can use the PDO::SetAttribute method to set your PDO object’s error mode as follows?

Answer

Correct Answer: $conn = new PDO( $dsn, $username, $password ); $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );

Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it