iphone - Adding data in sqlite table using array store only last entered records -


i inserting data in sqlite table , showing data in table view. problem when insert abc show in table abc, when again insert xyz shows xyz instead of abc , xyz. method select data inserted:

   nsmutablearray *temparray3 = [[nsmutablearray alloc] init];    self.libraryarray = temparray3;    [temparray3 release];    [coffee getinitialdatatodisplayl:[self getdbpath]]; 

adding data method:

- (void) addcoffee:(coffee *)coffeeobj {     //add database.     [coffeeobj addcoffee];     int countone=[libraryarray count];     nslog(@"count before adding %d",countone);      //add coffee array.     [libraryarray addobject:coffeeobj];     int count=[libraryarray count];     nslog(@"count after adding %d",count);     nslog(@"successfully added"); } 


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -