I have 2 columns of type VARCHAR(1000) and type TEXT in a SQLite db. My requirement is to store the values in an array into the db. I tried storing the values in the array into a string using the for loop but once the control comes out of the for loop the values displayed for the string is only the last element in the array...
Is there any way using which I can directly store the array into the DB??
Below is my code:
NSString *tempVal=0, *tempFlag=0;
NSString *temp[256], *Flag[256];
for(int i=0; i<256; i++)
{
NSLog(@"HELLO %d", tempVal);
temp[i] = (NSString*)valMines[i];
Flag[i] = (NSString*)openFlag[i];
NSLog(@"ValMines is %d", temp[i]);
NSLog(@"OpenFlag is %d", Flag[i]);
tempVal = temp[i];
tempFlag == Flag[i];
NSLog(@"ValMines is %d %d", temp[i], tempVal);
}
NSLog(@"Inside Save Data func");
NSLog(@"ValMines is %d", tempVal);
NSLog(@"OpenFlag is %d", tempFlag);
Would append work on it? How?