NSString *filename, *query; sqlite3* database; int r = sqlite3_open( [filename fileSystemRepresentation], &database ); char **table; int columnCount, rowCount; r = sqlite3_get_table( database, [query UTF8String], &table, &rowCount, &columnCount, NULL); r = sqlite3_close(database); NSString *value = [NSString stringWithUTF8String: table[ columnCount*3+2-1 ] ]; sqlite3_free_table(table); |