Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to check in iphone application if there is any data in sqlite data base
    primarykey
    data
    text
    <p>how to check at the start of the app wether there is data in sqlite or not if data is available in data base then it should upload other wise normally work the application</p> <p>i will upload this data using post and using php for to upload data to server.</p> <pre><code> + (void) getInitialDataToDisplay:(NSString *)dbPath { CereniaAppDelegate *appDelegate = (CereniaAppDelegate *)[[UIApplication sharedApplication] delegate]; if (sqlite3_open([dbPath UTF8String], &amp;database) == SQLITE_OK) { const char *sql = "select response_Id,question_id,answer_option,answer_text,update_date_time from survey_question_responses"; sqlite3_stmt *selectstmt; if(sqlite3_prepare_v2(database, sql, -1, &amp;selectstmt, NULL) == SQLITE_OK) { while(sqlite3_step(selectstmt) == SQLITE_ROW) { NSInteger primaryKey = sqlite3_column_int(selectstmt, 0); Coffee *coffeeObj = [[Coffee alloc] initWithPrimaryKey:primaryKey]; coffeeObj.question_Id = [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectstmt, 1)]; coffeeObj.answer_text = [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectstmt, 2)]; coffeeObj.answer_option = [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectstmt,3)]; coffeeObj.update_date_time = [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectstmt, 4)]; int count=[appDelegate.coffeeArray count]; NSLog(@"count is beofore getting values %d",count); [appDelegate.coffeeArray addObject:coffeeObj]; int countone=[appDelegate.coffeeArray count]; NSLog(@"count is after getting values %d",countone); [coffeeObj release]; } } } else sqlite3_close(database); //Even though the open call failed, close the database connection to release all the memory. } </code></pre>
    singulars
    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.
    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