0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 12:29:41 +08:00
sqlpp11/docs/Remove.md
Farook Al-Sammarraie 993ddcc049
Created docs directory (#364)
Copied wiki into docs directory
This allows developers to open pull requests to edit documentation and also use mkdocs to create a styled HTML version

* changed wiki links to relative links

* removed Planned-Features.md

* removed reference to planned features in Home.md
2021-05-09 09:01:22 +02:00

688 B

Since delete is keyword in C++ that has a different meaning than delete in SQL, sqlpp11 calls the method remove. There is no detailed documentation available yet, but here is an example that might help if you have read about select statements already:

db(remove_from(tab).where(tab.alpha == tab.alpha + 3));

Removing using multiple tables as condition:

test_sqlpp::Users usr;
test_sqlpp::UsersForms usr_forms;
test_sqlpp::Forms form_;

db(remove_from(usr_forms).using_(usr, form_, usr_forms).where( 
    usr_forms.iduser == usr.id 
    and usr.username == username 
    and usr_forms.idform == form_.id
    and form_.name == form_name
    ));