Summarizing Project Time8:06 with Alena Holligan
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.
Querying Relational Databases: ORDER BY
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.
You need to sign up for Treehouse in order to download course files.Sign up