I am developing an app wherein I obtain the json data from a url and insert the contents in the table. Till here everything works fine but now since the url contents can be changed every time it changes I need to add more stuff to my existing table for a particular person without changing the previous contents. Can you please guide me
The query that I have is as follows :
NSString *plquery = @"INSERT OR REPLACE INTO SHOPPERSLIST (COUNT, NAME, DATE, IDNUMBER) VALUES (?, ?, ?,";
NSString *update = [plquery stringByAppendingFormat:@"%i%@",[accessID integerValue],@")"];
NSLog(@"%@",update);
Insert or replace will update existing records if a record with a matching value for the primary key is found. If you are creating a new record every time, look into using an insert statement only.