I have an ID list
id = [339, 344, 340, 343, 345, 342, 341]
already select as in the way in this link here, this is the code
mycursor.execute("SELECT * FROM news_tb where id IN ({})".format(",".join([str(i) for i in hasil])))
but the results are in sequence
[(339, '..'), (340, '..'), (341, '..'), (342, '..'), (343, '..'), (344, '..'), (345, '..')]
I want the data output to be sequential according to the id in the list. Thankyou