Hi!
I want to update many fields randomly in a MySQL table, and I need to update two fields, one using unix timestamp and the other a date. For example, this is what I would have for the unix timestamp:
UPDATE `video` SET addtime= 1264982424 + (1355555555-1264982400)*RAND()
That should update the addtime randomly. However, there is another field in the table that is adddate and this uses mysql date. What can I do so that I write an addtime in Unix that is consistent with the adddate? I'm a bit of a noob in MySQL.
Thanks!
Originally asked by: luqita on Stack Overflow


Answers