diff --git a/SQL Query - Sayo b/SQL Query - Sayo new file mode 100644 index 0000000..c69a62e --- /dev/null +++ b/SQL Query - Sayo @@ -0,0 +1,31 @@ +#include +#include +using namespace std; + +#include "gamedatabase.hpp" + + +int main() +{ + try + { + sqlite::sqlite db( "gamedatabase.sqlite" ); + + cout << "Retrieve information on ...." << endl; + + string userInput; + getline(cin, userInput); + + auto cur = db.get_statement(); + cur->set_sql("SELECT Age, Ability1, Ability2 FROM player" + "NATURAL JOIN abilities" + "WHERE job = ?;"); + + cur->prepare(); + + while (cur->step()) + cout << cur->get_int(0) << " " << cur->get_text(1) << endl; + } + + + }