Skip to main content
Home
About Me
Portfolio
Blog
Software Development
News
Videos
Interview Questions
Coding Solutions
Competitive Programming
PHP Quiz
Cyber Security
Tools
Training
Events
News
People
Hacker Groups
Videos
Gaming
Museums
Events
News
Videos
Contacts
7 quizzes found.
Which of the following is not a valid PDO DSN?
All of the above are valid
mysql:unix_socket=/tmp/mysql.sock;dbname=testdb
oci:dbname=//localhost:1521/mydb
mysql:host=localhost;port=3307;dbname=testdb
sqlite2:/opt/databases/mydb.sq2
Choose 1 answers
Solve
When connecting to a database using PDO, what must be done to ensure that database credentials are not compromised if the connection were to fail?
wrap the PDO DSN in a try/catch block to catch any connection exception
Use constants in the PDO DSN
Place the login credentials in the php.ini file
Disable E_STRICT and E_NOTICE error reporting levels
Choose 1 answers
Solve
Implementing your own PDO class requires which steps from the list below?
Extending the PDOStatement Class
Set the PDO::ATTR_STATEMENT_CLASS parameter
Call the PDO::setStatementClass() method
Extend the PDO class
Set the PDO::ATTR_USE_CLASS paramater
Choose 3 answers
Solve
Which of the following methods are used to fetch data from a PDO Statement?
fetchColumn()
fetchObject()
fetch()
fetchClass()
fetchRow()
Choose 3 answers
Solve
In a general sense, which is more important: performance or maintainability of an application?
Performance first, maintainability second
Maintainability first, performance second
Maintainability
Performance
Choose 1 answers
Solve
Do you like cookies?
🍪 I use cookies to ensure you get the best experience on my website.
More cookies info
I agree