/ Published in: Objective C
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
{ if(sqlite3_open([[self dataFilePath] UTF8String],&database) != SQLITE_OK){ sqlite3_close(database); NSAssert(0, @"Failed to load database"); } sqlite3_stmt *statement; if(sqlite3_prepare_v2(database, [query UTF8String], -1, &statement, nil) == SQLITE_OK){ } sqlite3_finalize(statement); NSLog(@"length of returned array %d",[dishes count]); } else{ NSLog(@"There was an error loading from db"); } }