PDA

View Full Version : update time of posts


kenneth2000
03-05-2010, 09:10 AM
Hi Guys,

I would like to create a script that updates the time of my forum posts...the forum only has my own posts anyway so I think its ok to update the time.

The following works to update only the last post in a thread but all the posts.

Does anyone know how to incrementally update the previous post times so its like (lastpost - 1 hour)

UPDATE post SET dateline = ( dateline +86400 ) WHERE post.postid IN (SELECT thread.lastpostid FROM thread WHERE post.dateline < (SELECT UNIX_TIMESTAMP()-86400))