G`day all
I wannna lock all posts which have had no replies in a 30 day time period..
I was wondering if anyone knows a querie I can use to do so?
thanks :)
Are you on MySQL 4 or 3?
-[Unknown]
4.0.18 :)
UPDATE topics AS t, messages AS m
SET t.locked = 1
WHERE m.ID_MSG = t.ID_LAST_MSG
AND m.posterTime < UNIX_TIMESTAMP('YYYY-MM-DD');
That *should* work, but it's untested. Just put the desired date in for YYYY-MM-DD.
-[Unknown]
I might be doing something wrong but I get this after running the querie
QuoteError
SQL-query :
UPDATE topics AS t,
messages AS m SET t.locked =1 WHERE m.ID_MSG = t.ID_LAST_MSG AND m.posterTime < UNIX_TIMESTAMP( '2004-09-15' )
MySQL said:
#1146 - Table 'worldcic_yabbse.topics' doesn't exist
Change "topics" to include your prefix, for example "smf_topics" or "yabbse_topics". Same for "members".
-[Unknown]
Cool :)
works great after adding the prefixes to topics and messages..
Thanks a lot :)