|
|
Joined: Jul 2001
Posts: 1,157 Likes: 82
coffee and code
|
coffee and code
Joined: Jul 2001
Posts: 1,157 Likes: 82 |
I like this modification a lot - it works perfectly for what I need it for - excellent work again JP!!!! While installing, i noticed that in domergethread.php, there are two unnecessary ";" at the end of SQL queries... <br />// Get the board name and main numberof the old thread<br /> $query = "<br /> SELECT B_Board,B_Main<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Number = '$number';<br /> "; <br /> $sth = $dbh -> do_query($query);<br /> list ($oldboard,$oldmain) = $dbh -> fetch_array($sth);<br /><br />// How many posts are we moving<br /> $query = "<br /> SELECT COUNT(*)<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Main = '$number'<br /> ";<br /> $sth = $dbh -> do_query($query);<br /> list ($oldcount) = $dbh -> fetch_array($sth);<br /><br />// Get the start time of the old thread<br /> $query = "<br /> SELECT B_Posted<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Number = $oldmain<br /> ";<br /> $sth = $dbh -> do_query($query);<br /> list ($oldtime) = $dbh -> fetch_array($sth);<br /> <br /> <br />// Get the board keyword and main number of the new thread<br /> $query = "<br /> SELECT B_Board,B_Main<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Number = '$newnumber_q';<br /> "; <br /> Should be... <br />// Get the board name and main numberof the old thread<br /> $query = "<br /> SELECT B_Board,B_Main<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Number = '$number'<br /> "; <br /> $sth = $dbh -> do_query($query);<br /> list ($oldboard,$oldmain) = $dbh -> fetch_array($sth);<br /><br />// How many posts are we moving<br /> $query = "<br /> SELECT COUNT(*)<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Main = '$number'<br /> ";<br /> $sth = $dbh -> do_query($query);<br /> list ($oldcount) = $dbh -> fetch_array($sth);<br /><br />// Get the start time of the old thread<br /> $query = "<br /> SELECT B_Posted<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Number = $oldmain<br /> ";<br /> $sth = $dbh -> do_query($query);<br /> list ($oldtime) = $dbh -> fetch_array($sth);<br /> <br /> <br />// Get the board keyword and main number of the new thread<br /> $query = "<br /> SELECT B_Board,B_Main<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Number = '$newnumber_q'<br /> "; <br />
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|