Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to divide int value of Sqlite db table by 2
mark_ua_1999 last edited by mark_ua_1999
Hi, I have DB table and want divide row record that is integer by 2 what SQL query could help to do it
thanks for your help. I have tried the following query
query.exec("UPDATE "+people+ " WHERE id = "+id + " SET ticket_price = ticket_price*2") but failed
Do you want to modify the value in the database or only show the value multiplied by two ?
mark_ua_1999 last edited by
@SGaist Hi the problem is resolved want(modify the value in the database )
SET ticket_price = ticket_price * 2
WHERE id = <some id>
JonB last edited by
That looks suspiciously like "multiply" rather than "divide" to me....