this is my default table having 3 rows now i want to add 1 more row to ths database but i dont know the syntax
if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { // Setup the SQL Statement and compile it for faster access const char *sqlStatement = "select * from animals "; 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 *aName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)]; NSString *aDescription = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)]; NSString *aImageUrl = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 3)];
// Create a new animal object with the data from the database
Animal *animal = [[Animal alloc] initWithName:aName description:aDescription url:aImageUrl];
// Add the animal object to the animals Array
[animals addObject:animal];
[animal release];
}
and this my database value
CREATE TABLE animals ( id INTEGER PRIMARY KEY, name VARCHAR(50), description TEXT, image VARCHAR(255) , "4"); INSERT INTO "animals" VALUES(1,'Elephant','The elephant is a very large animal that lives in Africa and Asia','http://dblog.com.au/wp-content/elephant.jpg',NULL); INSERT INTO "animals" VALUES(2,'Monkey','Monkies can be VERY naughty and often steal clothing from unsuspecting tourists','http://dblog.com.au/wp-content/monkey.jpg',NULL); INSERT INTO "animals" VALUES(3,'Galah','Galahs are a wonderful bird and they make a great pet (I should know, I have one)','http://dblog.com.au/wp-content/galah.jpg',NULL); INSERT INTO "animals" VALUES(4,'Kangaroo','Well I had to add the Kangaroo as they are the essence of the Australian image','http://dblog.com.au/wp-content/kangaroo.jpg',NULL);
plz help to add 1 more rows from xcode