Created
March 10, 2012 19:59
-
-
Save shnhrrsn/2012757 to your computer and use it in GitHub Desktop.
This file contains 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
EGODatabase* database = [EGODatabase databaseWithPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/database.db"]]; | |
EGODatabaseResult* result = [database executeQuery:@"SELECT * FROM `posts` WHERE `post_user_id` = ?", [NSNumber numberWithInt:10]]; | |
for(EGODatabaseRow* row in result) { | |
NSLog(@"Subject: %@", [row stringForColumn:@"post_subject"]); | |
NSLog(@"Date: %@", [row dateForColumn:@"post_date"]); | |
NSLog(@"Views: %d", [row intForColumn:@"post_views"]); | |
NSLog(@"Message: %@", [row stringForColumn:@"post_message"]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment