⇧
vadnica-logo
My Services About the Project Telegram O meni O meni

Updating Data (UPDATE)

We currently have 10 active users in our table (ID 6 is missing because we deleted it). Our goal is to update the last name of the user with ID 11. The UPDATE command is used to modify existing data in a table. When using PDO, it is critical to use prepared statements, preventing unauthorized parties from modifying the wrong data.

EXAMPLE
RESULT
The result will be displayed here...

In the example above, we used the named parameters :last_name and :id. The execute() method will securely insert these values into the SQL command and update the selected row.