Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Grouping tasks by project is one of the most important things we can do. In fact, I think this should be the default view for our reports. We'll show a summary of the total time spent on each project.
Course
Querying Relational Databases: ORDER BY
Documentation
We can't use the "next()" function with a PDOStatement object, instead we need an array. So it's important that you fetch results instead of return the "query()".
query() Executes an SQL statement, returning a result set as a PDOStatement object.
fetchAll() Returns an array containing all of the result set rows.
next() Advance the internal array pointer of an array.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Zane DeVault
42,332 Points3 Answers
-
johnny louifils
Full Stack JavaScript Techdegree Graduate 18,926 Points1 Answer
-
Ronaldo Fialho
5,105 Points1 Answer
-
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points2 Answers
-
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points0 Answers
-
Qasim Hafeez
12,731 PointsDon't understand setting $project_id=$item['project']
Posted by Qasim HafeezQasim Hafeez
12,731 Points0 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
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