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
Now that we've completed adding projects, we're going to perform those same processes for adding tasks. Reading the task table and populating our task list.
$sql = 'SELECT tasks.*, projects.title as project FROM tasks JOIN projects ON tasks.project_id = projects.project_id';
Course
Querying Relational Databases: Joining Table Data with SQL
Additional Resources
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
Reading the task table and
populating our task list, accepting and
0:00
filtering user data, and finally,
writing that data to the database.
0:03
Once again,
0:08
we'll start with reading the data we
want to show on the task list page.
0:08
Back in functions.php,
let's duplicate the get_project_list.
0:14
And we'll name it get_task_list.
0:22
The SQL statement is going to
be a little more complicated, so
0:26
let's move it out of the query method.
0:29
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