Previous Thread
Next Thread
Print Thread
Rate Thread
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...

Code
<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...

Code
<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 />


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Sponsored Links
Entire Thread
Subject Posted By Posted
Finished-[6.5-6.5.1] Merge Threads 2.1 JoshPet 07/04/2004 8:03 AM
Re: Beta-[6.5] Merge Threads 2.0 Maze 07/19/2004 9:16 PM
Re: Beta-[6.5] Merge Threads 2.1 JoshPet 07/25/2004 1:04 AM
Re: Beta-[6.5] Merge Threads 2.1 isaac 10/14/2004 11:35 AM
Re: Beta-[6.5] Merge Threads 2.1 JoshPet 10/15/2004 7:43 AM
Re: Beta-[6.5] Merge Threads 2.1 Chevy454 12/21/2004 5:35 AM
Re: Beta-[6.5] Merge Threads 2.1 JoshPet 12/21/2004 9:07 AM
Re: Beta-[6.5] Merge Threads 2.1 Chevy454 12/22/2004 1:58 AM
Re: Beta-[6.5] Merge Threads 2.1 nimh 01/05/2005 1:58 PM
Re: Beta-[6.5] Merge Threads 2.1 JoshPet 01/06/2005 5:49 AM
Re: Beta-[6.5] Merge Threads 2.1 JoshPet 03/02/2005 5:24 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)