Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to store in sqlite database from json
    primarykey
    data
    text
    <p>I create one application and I read many data in table View from JSON and I want parsed this JSON and store in sqlite but I dont know from where should I start?</p> <p>this is parsed my json code :</p> <pre><code>@implementation TableViewController { NSArray *news; NSMutableData *data; NSString *title; NSMutableArray *all; } @synthesize mainTable; - (void)viewDidLoad { [super viewDidLoad]; self.title = @"News"; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; NSURL *url = [NSURL URLWithString:@"http://zacandcatie.com/YouTube/json.php"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; NSURLConnection *con = [[NSURLConnection alloc] initWithRequest:request delegate:self]; [con start]; } - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { data = [[NSMutableData alloc]init]; } - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)theData { [data appendData:theData]; } - (void)connectionDidFinishLoading:(NSURLConnection *)connection { [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; news = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil]; for (int i =0; i &lt; [news count]; i++) { NSIndexPath *indexPath = [self.mainTable indexPathForSelectedRow]; title =[[news objectAtIndex:indexPath.row+i]objectForKey:@"title"]; if (!all) { all = [NSMutableArray array]; } [all addObject:title]; } NSLog(@"%@",all); [mainTable reloadData]; } - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { UIAlertView *errorView = [[UIAlertView alloc]initWithTitle:@"Error" message:@"The Connection has been LOST" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil]; [errorView show]; [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; } </code></pre> <p>you my json url. I want store "title"&amp;"date_string" value in sqlite. please guide me!!! </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload