sqlite3 - CONDITION ON INSERT -


i have database contain name , properties of 2 different classes of files filled after server send client. that:

case     when (select count() files_table_1 id="some id") not 0         (update files_table_1 set(...) id="some id")     else (insert files_table_2 (...) values(...))     end; 

but not work.

is there way that? thanks!

c++ has keyword if situations this:

bool ok = query.exec("update ..."); ... if (query.numrowsaffected() == 0) {     ok = query.exec("insert ...");     .... } 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -