Hi I need help understanding how to update just the timestamp column independent of any column. I've been searching on google for an example of this but I don't see any relevant examples. Below I've pasted code that does it for ID = 1 for testing purposes but there was no update to the time for ID = 1. My goal though is to update the timestamp for all rows regardless of the column name.
*TLATemplate already contains column called 'timestamp' *config is a module that has imported time
Thank you!
Below is my code:
sql = "CREATE TABLE %s like TLAKnoxT5Template" %TLA_dict['TLA_name']
config.cursor.execute(sql)
config.db.commit()
#copy entire table
sql = "INSERT INTO %s SELECT * FROM TLAKnoxT5Template"%TLA_dict['TLA_name']
config.cursor.execute(sql)
config.db.commit()
#update timestamp
sql = "UPDATE %s SET TIMESTAMP = %s WHERE ID = 1"%
(TLA_dict['TLA_name'],config.time.strftime("%Y-%m-%d %H:%M:%S",/
config.time.localtime(config.time.time())))
config.cursor.execute(sql)