When using PDO in PHP, which method is typically used to execute a prepared statement?
- execute()
- query()
- fetch()
- prepare()
In PDO (PHP Data Objects), the 'execute()' method is typically used to execute a prepared statement. It is used after preparing the statement with 'prepare()' to execute the query.
Loading...
Related Quiz
- Which of the following is NOT a recommended approach to prevent SQL injection attacks in PHP?
- Which of the following PHP functions checks if a file or directory exists?
- You have a PHP script and you need to execute a query in a MySQL database. How would you do this?
- How can you destroy a session in PHP?
- The $_POST superglobal in PHP is often used to collect form data sent via the POST method.