Last active
February 7, 2020 05:26
-
-
Save mahmudahsan/1bf2ce9eeba58ab9943e7d27fa2ac774 to your computer and use it in GitHub Desktop.
Objective-C Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const char *sqlStatement = [query UTF8String]; | |
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) { | |
// Read the data from the result row | |
NSString *word = [NSString stringWithUTF8String:(char *)sqlite3_column_tcompiledStatement, | |
[arrayWords addObject:word]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment