I have a table having data.
id type
1 max
1 sam
1 rom
2 jak
I want to retrieve all the type
where id=1;
if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) {
while(sqlite3_step(compiledStatement) == SQLITE_ROW) {
NSString *aRecord = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 0)];
NSLog (@"%@",aRecord);
}
this statement retrive me only the last record. How can i get all the records?
how to catch these records in the variable. I am using aRecord but it store only last record. So this is the main concern