How to use PDO to update the database?

1394 0

$1*/ mo hosting! Get going with GoDaddy!

1) Write the regular update statement and again, instead of values, assign the named placeholders. For example:

2) Prepare the query:

3) Bind the parameters:

4) Define the bound values:

5) Execute the query:

6) Check that the query has been performed and that the database has been successfully updated.

In this article

Join the Conversation