I have tested your code and it returns "2".
Something strange is happening, because when I change
query.prepare("select :a / :b");
query.prepare("select :a / :b");
To copy to clipboard, switch view to plain text mode
to
query.prepare("select :a + :b");
query.prepare("select :a + :b");
To copy to clipboard, switch view to plain text mode
or
query.prepare("select :a - :b");
query.prepare("select :a - :b");
To copy to clipboard, switch view to plain text mode
or
query.prepare("select :a * :b");
query.prepare("select :a * :b");
To copy to clipboard, switch view to plain text mode
it returns me the right result.
Do you see anything wrong with my code?
Renan
Bookmarks