SqliteModernCpp / sqlite_modern_cpp

The C++14 wrapper around sqlite library
MIT License
904 stars 156 forks source link

can i use UPDATE command? #140

Closed j4rv1s1 closed 7 years ago

j4rv1s1 commented 7 years ago

hi does this wrapper have the UPDATE command? i need to make a query to update specific rows in my table, can i do that? if so, how?

thanks!

Killili commented 7 years ago

This is a wraper for the API that SQLite uses to interact with its SQL parser und systems so we dont have special functions handling spezific SQL commands. You can use all SQL functions and more with this wrapper. Take a look at the README on how to use the wrapper to issue SQL commands and take a look at the SQLite (or any SQL documentation) to form youre commands.

j4rv1s1 commented 7 years ago

i tried typing in the query field of my c++ program which uses this wrapper this command " UPDATE Tablename SET field1 = 'snake', field2 = 'cat', field3 = 'shark', field4 = 'dog' WHERE ROWID = 1; "

but it gives me the "sql logic error" when executed, i just need to update some fields inside the table (it would be even cool if the rowid would autoincrement itself when executed without keeping changing it manually)

Killili commented 7 years ago

I'm sorry but your problem is not wrapper related, its just a SQL problem. Please ask at a more apropriate place like https://stackoverflow.com/questions/tagged/sql