과연 소중하게 받아들여질까?
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [[AddressBook sharedAddressBook] countInSection:section];
}
- (NSInteger)countInSection:(NSInteger)section
{
int count = 0;
if(section >= 0 && section < [categories count])
{
NSString *qry = [NSString stringWithFormat:@"SELECT count(*) FROM t_contacts WHERE recordId is not null and consonant LIKE '%@%%' AND groupNames LIKE '%%%@%%' %@",
[categories objectAtIndex: section],filterGroup,filterText];
FMResultSet *rs = [database executeQuery:qry];
while([rs next]) {
count = [rs intForColumnIndex:0];
break;
}
[rs close];
}
else
{
count = 0;
}
return count;
}
댓글 없음:
댓글 쓰기