Problem: Members do not close old threads before starting new ones.
Solution I seek: Run an SQL query at the same the member attempts to start a new thread in that forum, closing all open threads by that user.
SQL I managed to cobble together:
Will it work? Thank you. Any feedback is greatly appreciated.
Solution I seek: Run an SQL query at the same the member attempts to start a new thread in that forum, closing all open threads by that user.
SQL I managed to cobble together:
Code:
$forumid = forum ID; $username = $this->post['username']; $sql = "SET open = 0 FROM `thread` WHERE `forumid` = `$forumid` AND `postusername` = `$username` AND sticky = 0";
Comment