Created
November 30, 2018 21:04
-
-
Save exclusiveTanim/aea707e8f639d96d5a8eee17d1ab7954 to your computer and use it in GitHub Desktop.
যারা যারা ডাটাবেজে ইন্সার্ট করেছেন এখন ডাটা আন্তে পারছে না
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "HomeViewController.h" | |
#import "dboperation.h" | |
#import "TableViewCell.h" | |
@interface HomeViewController () | |
@end | |
@implementation HomeViewController | |
NSMutableArray *names; //এ ARRAY তে নাম গুলো থাকবে | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
//নিচের কোড দিয়ে কুয়েরি করা হয়েছে সব ডাটা আনার জন্য | |
NSString *selectSQL = @"select * from student_info"; | |
dboperation *dop = [[dboperation alloc]init]; | |
NSMutableArray *cuntVal = [[NSMutableArray alloc]init]; | |
cuntVal = [dop getstudentinfo:selectSQL]; | |
NSLog(@"Full %@",cuntVal); | |
names=[cuntVal valueForKey:@"firstName"]; | |
NSLog(@"The names are %@",names); | |
} | |
- (void)didReceiveMemoryWarning { | |
[super didReceiveMemoryWarning]; | |
// Dispose of any resources that can be recreated. | |
} | |
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ | |
return 1; | |
} | |
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ | |
return names.count; | |
} | |
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ | |
static NSString *identifier=@"TableCell"; | |
TableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath]; | |
NSInteger row=[indexPath row]; | |
cell.lab.text=names[row]; | |
return cell; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment