Re: Deleting topics older than 2 hours?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sounds to me like you didn't understand the question. The table structure is something like:
____________topics_____________
| id | forum | author | subject | posttime |
-----------------------------

_____________posts____________
| id | topic | author | message | posttime|
-----------------------------

The problem is, if I run a query like (I know the query is probably wrong, I'm just writing it now):
delete from topics where posttime + interval 2 hours < now()
I would leave "orphan" posts inside of that topic. I'm not sure how (or if it's even possible) to delete the posts as the topic is deleted.

DL Neil wrote:

Sorry Leif, but CrystalBall v2.6 is currently unable to help.
The word WHERE features.
Show us the money - or second choice: the (erroneous) code...
=dn



I'm trying to run a cron job to delete forum topics more than 2 hours
old. I know how to do that, but the problem is also deleting the posts
in the topic at the same time. Can someone shed some light on this,

please?

--
The above message is encrypted with double rot13 encoding. Any

unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux