I want to implement a method that will check search for entries that have the localhost ip address upon exiting the program and delete those rows.
The problem is, I'm not sure how to do this in Qt I can't really find anything specific when I search. Is there a way to create a sql variable in qt, or can I use a qt variable in an sql query? To give you an idea of what I want to do please see below:
QSqlQuery query;
query.exec("DELETE FROM host WHERE ip = <localhost_variable??>");
Any tips?
QSqlQuery?