Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed CRUD Operations with PHP!
You have completed CRUD Operations with PHP!
Preview
We're all human, and as humans, we all make mistakes. Updating allows us to fix mistakes or make any other changes that may occur.
Course
Modifying Data with SQL: Updating All Rows in a Table
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Let's start in functions.php and
update the add_task function.
0:00
First we need to accept
the optional task id.
0:01
Then we can check for that id to see if
we're going to add or update the task.
0:06
If our task_id is set,
then we're going to update.
0:12
sql equals UPDATE our tasks.
0:18
We'll set our project_id.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up