Repeating Tasks Without Repeating Projects |
[eluser]jshultz[/eluser]
Here's the link to the code: http://stikked.com/view/8550586 It's repeating the project over and over, and I would like for it to just show the project once and then the associated tasks below it. I'm just not sure how to accomplish that though. Would there be a way to loop through the join data to just show the tasks without reprinting the project name?
[eluser]garymardell[/eluser]
You will need to pass through a limit $this->db->limit(1); Also seems your get tasks by id has no id to work with. That function tasksByProjectId() is always going to return all the projects.
[eluser]jshultz[/eluser]
How would that ($this->db->limit(1) ![]() In other words I want: project -task -task project 2 -task project 3 project 4 -task -task -task instead, i'm getting project -task project -task project 2 etc. etc. etc.
[eluser]garymardell[/eluser]
Oh sorry, i thought you meant that you just wanted to show one project. My bad. You will probably have to create a temporary array using the id as the array index.
[eluser]jshultz[/eluser]
that's exactly what I ended up doing and it worked. thanks. ![]() Here's the code thanks to ignitedcoding on the IRC channel: Code: <?php $currentProjectID = NULL; ?> |
Welcome Guest, Not a member yet? Register Sign In |