Using sectioned tables from an sqlite file with an iPhone uitableview
- by Chris
I am currently trying to make a sectioned table like this:
Section 1:
Entry 1
Entry 2
Entry 3
Section 2:
Entry 4
Entry 5
Entry 6
Section 3:
Entry 7
Entry 8 ...
However, using this code:
Event *lists = (Event *)[eventList objectAtIndex:indexPath.row];
accessStatement = "select * from DatabaseName";
[self findEvents]; // Code that builds each object's strings from database
cell.textLabel.text = lists.name;
Section 1:
Entry 1
Entry 2
Entry 3
Section 2:
Entry 1
Entry 2
Entry 3
Section 3:
Entry 1
Entry 2 ...
It keeps on repeating itself. How do I make the index so that it continues in each section rather than restarts?
Thanks in advance.