Facing an issue while fetching data in sqlite in ios : - (NSMutableArray*)getAllDataFromTableUSERINFO:(NSString *)fetchQuery {
    NSMutableArray *resultArray1 =[[NSMutableArray alloc]init];
    @autoreleasepool {
    if (sqlite3_open([[self getDBPath]UTF8String],&database)==SQLITE_OK){
        sqlite3_stmt *stmt;
        const char *sqlfetch=[fetchQuery UTF8String];
        if (sqlite3_prepare(database, sqlfetch, -1,&stmt, NULL)==SQLITE_OK) {
            while (sqlite3_step(stmt)==SQLITE_ROW){
                RM_USER_INFO *UserInfo = [[RM_USER_INFO alloc]init];
                UserInfo.uid=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,0)];
                UserInfo.username=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,1)];
                UserInfo.password=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,2)];
                UserInfo.fname=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,3)];
                UserInfo.mname=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,4)];
                UserInfo.lname=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,5)];
                UserInfo.nickname=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,6)];
                UserInfo.email=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,7)];
                UserInfo.phone=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,8)];
                UserInfo.city=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,9)];
                UserInfo.state=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,10)];
                UserInfo.country=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,11)];
                UserInfo.zip=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,12)];
                UserInfo.gender=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,13)];
                UserInfo.income=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,14)];
                UserInfo.age=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,15)];
                UserInfo.socialnetworktype=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,16)];
                UserInfo.reallymake_points=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,17)];
                UserInfo.create_date=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,18)];
                UserInfo.update_date=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,19)];
                UserInfo.lastsync_date=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,20)];
                UserInfo.encrypt_key=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,21)];
                UserInfo.session_hash_key=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,22)];
                UserInfo.websocket_key=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,23)];
                UserInfo.device=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,24)];
                UserInfo.max_model_id=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,25)];
                UserInfo.ads_status=[NSString stringWithUTF8String:(char *)sqlite3_column_text(stmt,26)];
                [resultArray1 addObject:UserInfo];
            }
        }
        sqlite3_finalize(stmt);
        stmt=nil;
        sqlite3_close(database);
        sqlite3_release_memory(120);
    }
    }
    return resultArray1;
}
