sqlite3 * db = [Database openDB];
sqlite3_stmt * stmt = nil;
NSString * sqlString = [NSString stringWithFormat:@"delete from Student where id = %d",ID];
int result = sqlite3_prepare_v2(db, [sqlString UTF8String], -1, &stmt, nil);
if (result == SQLITE_OK) {
if (sqlite3_step(stmt) == SQLITE_DONE) {
sqlite3_finalize(stmt);
[Database closeDB];
return YES;
}
}
sqlite3_finalize(stmt)
;
[Database closeDB];