The table is created as
CREATE TABLE contas (nome TEXT, email TEXT, senha TEXT, data TEXT, idade TEXT, clearance TEXT)
Than I insert
comandoSQL = "INSERT INTO contas VALUES (";
comandoSQL += "'" + acc.getNome().getValor() + "', ";
comandoSQL += "'" + acc.getEmail().getValor() + "', ";
comandoSQL += "'" + acc.getSenha().getValor() + "', ";
comandoSQL += "'" + acc.getData().getValor() + "', ";
comandoSQL += "'" + acc.getIdade().getValor() + "', ";
comandoSQL += "'" + acc.getClearance().getValor() + "')";
And finally retrieved with
comandoSQL = "select nome from contas where email = '"; comandoSQL += mail.getValor(); comandoSQL += "';";
comandoSQL = "select senha from contas where email = '"; comandoSQL += mail.getValor(); comandoSQL += "';";
comandoSQL = "select data from contas where email = '"; comandoSQL += mail.getValor(); comandoSQL += "';";
comandoSQL = "select idade from contas where email = '"; comandoSQL += mail.getValor(); comandoSQL += "';";
comandoSQL = "select clearance from contas where email = '"; comandoSQL += mail.getValor(); comandoSQL += "';";
In english nome = name, senha = password, data = date(in my program it's birthday date), idade = years old.
I am using C++ to use the SQLite. If there's any need to post the callback you just gotta ask for it.
Selected values work fine except for data and idade, those two are inverted.
Would anyone know why?

New Topic/Question
Reply




MultiQuote



|