Try "qry.lastError().text()" @ line 39 in lieu of "db.lastError().text()"
Try "qry.lastError().text()" @ line 39 in lieu of "db.lastError().text()"
now the error changes like:
error = "near "1": syntax error Unable to execute statement"
What wysota was trying to say to you is: You are using the wrong database driver for MySql. This is most probably also the reason why the query throws an error. Not all database systems understand the same SQL commands.
Yours SQL query is bad It should be or
Of course, the latter figure does not make sense.Qt Code:
SELECT * FROM `tablo` WHERE 1To copy to clipboard, switch view to plain text mode
@Lesiok
Yeah, I corrected the code as you said and it works! Thank you all guys
Bookmarks