every one. I'm trying to use my custom database. So I written following. But If when i ran this, i found it return nil.
Why?
I didn't find why this is.
Please help me.
NSString *name ;
NSString * content ;
FMResultSet *rs = [db executeQueryWithFormat:@"SELECT name, content FROM projects WHERE id = %d", projectID];
Here projectID is a given parameter. And i had a breakpoint just next line.
//if ([rs next]) {
name = [rs stringForColumnIndex:0];
content = [rs stringForColumnIndex:1];
[rs close];
return [NSDictionary dictionaryWithObjectsAndKeys:name, @"name", content, @"content", nil];
//}
[rs close];
return nil;
At the resutl, the name and content was nil. What happened?
Before that, db is opened correctly, and i updated it. I saw this by log and commandline of sqlite3 on terminal.
Please help me!