Forums
This topic is locked
Timestamp
15 Aug 2006 03:12:50 Steve C posted:
Just need a few pointers, i have an insert record happening to two tables(table1 and table2), the first table is used for add/delete records and the second is for a log of add and deletes of table1, what i'm having an issue with is updating timestamp of table2 when a delete happens for table1.So at the end of the day, when an add record is added, it records the timestamp, and when the record is deleted is will record when its deleted.
I have it all working except for the timestamp update.
Sorry to sound confusing.
Cheers
S
Replies
Replied 15 Aug 2006 12:56:38
15 Aug 2006 12:56:38 Roddy Dairion replied:
Well normally if the type for the fieldname Timestamp is timestamp, then it should do it automatically.
Replied 17 Aug 2006 02:10:17
17 Aug 2006 02:10:17 Steve C replied:
mmm, thats where i might be wrong, my update for type is in a hiddenfield with the timestamp field attached to it.
Thats why it might not be working.
No, that didnt work, i think sisnce table2 is the second one, the timestamp is only working for table1. Although i have called for table2 to updated its not working. Any other thoughts?
S
Edited by - miraj on 17 Aug 2006 03:22:20
Thats why it might not be working.
No, that didnt work, i think sisnce table2 is the second one, the timestamp is only working for table1. Although i have called for table2 to updated its not working. Any other thoughts?
S
Edited by - miraj on 17 Aug 2006 03:22:20
Replied 17 Aug 2006 09:08:58
17 Aug 2006 09:08:58 Roddy Dairion replied:
If you're using php the use the date() function, and include it in your query. Or if not then you just have to update the timestamp in the table with this function in sql CURRENT_TIMESTAMP(). This will give you the date and time.