Hello,

please help me to find  a solution to check if the record is already in
database or not.

I have tried the following but does not help:
       
        sqlite3_stmt *stmt;
        const char *sql_check = "SELECT * FROM MY_DATABASE WHERE id=?";
        NSString *name = nil;
        if(sqlite3_prepare_v2(myDatabase, sql_check, -1, &stmt, NULL) == 
SQLITE_OK)
{
                if (sqlite3_step(stmt) == SQLITE_NOTFOUND) {
                        NSLog(@"Not found");
                }
        }

 I want to find the text that is going to be inserted.

Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Find-in-SQLite-database-tp23171280p23171280.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to