Hello everyone,
I made a simple app that show the content of a table on a cell view. Everything is working fine but when I'm trying to change the query to get informations from another table, it dosen't work... The only thing I do is change the request in the database initialization and in the initWithPrimaryKey fonction. (I change "SELECT pk FROM itineraire" to "SELET pk FROM etape" and it's not a database problem..)
When it try to bind the sql, it dosen't pass the first IF and go to the error message :
Anyone have an idea on what's going on ?
Thanks
I made a simple app that show the content of a table on a cell view. Everything is working fine but when I'm trying to change the query to get informations from another table, it dosen't work... The only thing I do is change the request in the database initialization and in the initWithPrimaryKey fonction. (I change "SELECT pk FROM itineraire" to "SELET pk FROM etape" and it's not a database problem..)
When it try to bind the sql, it dosen't pass the first IF and go to the error message :
Code:
if (sqlite3_step(init_statement) == SQLITE_ROW){
self.text = [NSString stringWithUTF8String:(char*)sqlite3_column_text(init_statement,0)];
} else {
//It goes here and show the message 4 time (there's 4 //element supposed to be returned by my db)
self.text = @"Aucune itininéraire disponible";
}
Anyone have an idea on what's going on ?
Thanks