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