좋아, 내 아이폰 애플 리케이션에서 MySQL 데이터베이스에 연결할 수 있어요, 나는 tableview에서 그것을 설정했습니다. 그래서 didSelectRow 메서드를 호출하면 indexRow 번호가 아니라 사용자 ID 번호가 저장됩니다. 내 질문에 어떻게 저장 정보를 나머지 정보를 검색 할 수 있습니다, 그래서 행을 누르면 해당 사용자의 나머지 특정 정보를 나타납니다. 나는 내 iPad에서 이것을 쓰고 있기 때문에 나는 여기에 어떤 코드도 보여주지 않는다는 것을 알고있다. 그래서 나는 당신이 무엇을하려고 노력하고 도움을 주는지 당신이 바라기를 바란다. 감사.데이터베이스에서 데이터 가져 오기.
0
A
답변
0
저장된 ID 데이터베이스에서 가져온 내용은 무엇입니까? 내 이해는 사용자가 행을 선택하면 새로운보기로 이동하여 그 이 저장된 ID을 사용하여 db에서 해당 정보를 가져오고 싶습니다.
1
내가 u는 u는 우리가 샘플 코드를 원하는 시간에 해당 배열을 호출 할 수 있습니다 appdel에 배열의 데이터베이스에서 나오는 배열을 저장할 수있는 하나의 방법으로 U 도움이가 여기
입니다 appdb
에 appdbNSMutableArray *fruit_details;
호출 한 메소드의 배열
[self readStudentFromDatabase];
은 그 방법에서 여기에 코드를 작성
NSArray *documentpaths= NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDir = [documentpaths objectAtIndex:0];
databasePath = [documentDir stringByAppendingPathComponent:databaseName];
fruit_details=[[NSMutableArray alloc]init];
//open the database from the users filesystem
if(sqlite3_open([databasePath UTF8String], &database)==SQLITE_OK)
{
// Setup the SQL Statement and compile it for faster access
const char *sqlStatement ="select * from stu";
sqlite3_stmt *compiledStatement;
if(sqlite3_prepare_v2(database, sqlStatement,-1, &compiledStatement , NULL)== SQLITE_OK)
{
// Loop through the results and add them to the feeds array
while (sqlite3_step(compiledStatement)==SQLITE_ROW)
{
NSString *aName =[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement,0)];
NSString *amarks=[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement,1)];
NSString *arank =[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement,2)];
NSString *aaddr =[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement,3)];
NSString *aemail =[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement,4)];
NSString *aphno =[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement,5)];
NSString *aage =[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement,6)];
NSString *asex =[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement,7)];
NSString *adate =[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement,8)];
NSString *aimage=[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 9)];
// // Create a new animal object with the data from the database
//animal *animal_object=[[animal alloc]initWithName:aName description:arollNO url:amarks];
//add the animal object to the animal ar
//[animals addObject:animal_object];
temp=[[NSMutableArray alloc]init];
[temp addObject:aName];
[temp addObject:amarks];
[temp addObject:arank];
[temp addObject:aaddr];
[temp addObject:aemail];
[temp addObject:aphno];
[temp addObject:aage];
[temp addObject:asex];
[temp addObject:adate];
[temp addObject:aimage];
[fruit_details addObject:temp];
}
}
sqlite3_finalize(compiledStatement);
}
sqlite3_close(database);
이것이 도움이 될 것이라고 생각합니다 .....
관련 문제
- 1. 데이터베이스에서 데이터 가져 오기
- 2. 데이터베이스에서 데이터 가져 오기
- 3. mysql 데이터베이스에서 데이터 가져 오기
- 4. 원격 데이터베이스에서 데이터 가져 오기
- 5. 데이터베이스에서 정적 데이터 가져 오기
- 6. Microsoft Works 데이터베이스에서 SqlServer로 데이터 가져 오기
- 7. Store 데이터베이스에서 Java로 데이터 가져 오기
- 8. mysql 데이터베이스에서 불필요한 데이터 가져 오기 ??? (PHP)
- 9. PHP : * strange * MySQL 데이터베이스에서 데이터 가져 오기
- 10. 두 날짜 사이에있는 데이터베이스에서 데이터 가져 오기
- 11. MySQL 데이터베이스에서 MS Access 데이터 가져 오기
- 12. 웹 사이트 데이터베이스에서 데이터 가져 오기 + how
- 13. 데이터베이스에서 정보 가져 오기
- 14. PeopleSoft에서 데이터 가져 오기
- 15. SQL 데이터베이스에서 테이블 가져 오기
- 16. sql 데이터베이스에서 이미지 가져 오기
- 17. 데이터베이스에서 데이터베이스 사용자 가져 오기
- 18. 데이터베이스에서 사이트 맵 가져 오기
- 19. 많은 양의 레코드를 데이터베이스에서 가져 오기
- 20. 활동간에 배열 전달 또는 데이터베이스에서 데이터 가져 오기
- 21. iPhone - 데이터베이스에서 테이블 뷰 셀로 직접 데이터 가져 오기?
- 22. jQuery AJAX를 사용하여 웹 서비스를 통해 데이터베이스에서 데이터 가져 오기
- 23. SQL 데이터베이스에서 무작위 데이터 가져 오기 반복 없음
- 24. SQL Server 2008의 연결된 데이터베이스에서 주기적으로 데이터 가져 오기
- 25. ajax 게시물 제출 후 데이터베이스에서 데이터 가져 오기
- 26. 테스트 가능한 "데이터베이스에서 데이터 가져 오기"클래스 작성하기
- 27. 하나의 목록에서 두 가지 조건으로 데이터베이스에서 데이터 가져 오기
- 28. PHP를 사용하여 postgres 데이터베이스에서 이미지 가져 오기
- 29. Linq에서 SQL로 데이터베이스에서 이미지 가져 오기
- 30. iOS에서 SQL 데이터 가져 오기
예. 정확합니다. id는 db에서 얻은 것입니다. 해당 데이터를 가져 와서 새 뷰에 넣는 방법을 이해할 수 없거나 이해할 수 없습니까? –