Reputation: 653
I have implemented an iPhone application with sqlite as my backend.
In that I have a Table '*PrioritysDatabaseTable**' for Some Priorityin Database..
With two columnsPriorityID (Primary key + Auto Increment) & PriorityTitle(VarChar)
I retrieve the records in an array from the 'PrioritysDatabaseTable' and displayed in a table view.
In Edit table view i Have 3 features 1.Add new Priority , 2.Delete RPriority, 3.ReOrder Prioritys.
1.add newPriority: I inserted a PriorityTitle in Text Field and Implemented Insert Method in sqlite DataBase.
2. deletPriority: delete By taping on delete button beside the cells, implemented Delete method in sqlite Database.
These two are working fine,
Problem is when reader the table..
I can reorder in visible but not in data base..
I used some logics in update query to reorder database table but these are failed in some scenarios..
Can any one have the proper implementation
Upvotes: 0
Views: 446
Reputation: 653
Fixed:
Remove all my table data from data base
and re insert from the Array, that retrieve the records in an array from the 'rolesDatabaseTable'
with changed order
Upvotes: 1