Hi,
i am using sqlite3 with C++, and everything is ok. I have a situation and i
do not know how to handle it :
Let's say i have a database file named "MyDatabase", i am opening this
database as follows:
sqlite3 *db;
int rc;
rc = sqlite3_open( "C:\\MyDatabase", &db );
if ( rc )
{
sqlite3_close(db);
}
else //Database connection opened successfuly
{
char *zErrMsg = 0;
rc = sqlite3_exec( db, "DELETE FROM urls", NULL, NULL, &zErrMsg );
if( rc != SQLITE_OK )
{
sqlite3_free( zErrMsg );
}
sqlite3_close(db);
}
The previous code will delete everything in the "urls" table and this is not
what i want.
I have a string Array "MyURLsArray" which contains 20 URLs as strings. My
question is:
How can i format the SQL query so that, it will delete all the entries in
"urls" table, but keep the entries that match the strings stored in the
string Array "MyURLsArray" ?
I am new to SQL so any help will be appreciated.
Thanks in advance.
--
View this message in context:
http://www.nabble.com/sql-query-with-sqlite3_exec-tp23988559p23988559.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users