hi guys, i need to fill tableview with tasks from this sql select and put it into the sections for each project:
Code:
@"SELECT * FROM tasks WHERE task_today = 1 AND task_project = %@ ORDER BY task_order", project_id
result is NSArray
Code:
{
"project_id" = 1;
"project_name" = Project;
"task_done" = 0;
"task_id" = 4;
"task_name" = task1;
"task_order" = 0;
"task_project" = 1;
"task_today" = 1;
},
{
"project_id" = 2;
"project_name" = Project2;
"task_done" = 0;
"task_id" = 10;
"task_name" = task2;
"task_order" = 0;
"task_project" = 2;
"task_today" = 1;
},
it works well with simple insert to table, but i want it in sections - for each project.
so my question is, how to split it to some NSMutableArray or smt, and display in sections.
thx