Previous Thread
Next Thread
Print Thread
Rate Thread
#266166 01/06/2004 2:50 PM
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
The ubbthreads created mysql error logs look like this on my board:

Sat, Jan 03 2004 01:33:40 +0100 /ubbthreads/showflat.php 213.76.68.118
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB23' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,t2.U_Username DESC LIMIT 309, 12 - Unknown table 't2' in order clause

Sat, Jan 03 2004 01:34:05 +0100 /ubbthreads/showflat.php 213.76.68.118
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB23' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,t2.U_Username DESC LIMIT 309, 12 - Unknown table 't2' in order clause

Sat, Jan 03 2004 08:17:09 +0100 /ubbthreads/showflat.php 213.161.226.54
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB24' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,t2.U_Username DESC LIMIT 12 - Unknown table 't2' in order clause

Sat, Jan 03 2004 09:21:00 +0100 /ubbthreads/showflat.php 212.77.192.61
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB10' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,t2.U_Username DESC LIMIT 99, 12 - Unknown table 't2' in order clause

Sat, Jan 03 2004 09:21:05 +0100 /ubbthreads/showflat.php 212.77.192.61
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB10' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,t2.U_Username DESC LIMIT 99, 12 - Unknown table 't2' in order clause

Sat, Jan 03 2004 09:22:03 +0100 /ubbthreads/showflat.php 212.77.192.61
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB10' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,t2.U_Username DESC LIMIT 99, 12 - Unknown table 't2' in order clause

Sat, Jan 03 2004 09:22:07 +0100 /ubbthreads/showflat.php 212.77.192.61
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB10' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,t2.U_Username DESC LIMIT 99, 12 - Unknown table 't2' in order clause


In all lines (4 pages in 2 days) it say's: Unknown table 't2'

Does anyone know why?

Ron



Edit: to remove the code tags so it wraps

Last edited by JoshPet; 01/06/2004 7:32 PM.

Those who fail to read ask many questions:-)
Sponsored Links
Joined: Mar 2003
Posts: 159
Member
Member
Joined: Mar 2003
Posts: 159
I am having the same problem.

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
It's a bug in 6.4.
The the official bug forum for a fix

Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Ok I'll check that out. Thanks.


Those who fail to read ask many questions:-)
-Fusion- #266170 01/07/2004 10:03 PM
Joined: Mar 2003
Posts: 159
Member
Member
Joined: Mar 2003
Posts: 159
[]Astaran said:
It's a bug in 6.4.
The the official bug forum for a fix [/]
Thanks

Would the correct thing to do be to search through the showflat.php file and DELETE all "2t."'s that can be found?

Thanks,

BWilliams

Sponsored Links
vajraman #266171 01/07/2004 10:59 PM
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
No, only the one's referenced in the bug fix.


UBB.threads Developer
Sally #266172 01/08/2004 12:20 PM
Joined: Mar 2003
Posts: 159
Member
Member
Joined: Mar 2003
Posts: 159
[]Scream said:
No, only the one's referenced in the bug fix. [/]
Thanks,

BWilliams

Sally #266173 01/08/2004 6:40 PM
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
I applied the bug fix and now the log only shows these errors. (I guess they where there before as well)

Thu, Jan 08 2004 12:46:18 +0100 /ubbthreads/postlist.php 195.240.225.132
Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_LastPosterId,t1.B_LastPostNum,t1.B_Poll,t1.B_CalDay FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'dreambox' AND t1.B_PosterId = t2.U_Number AND t1.B_Approved = 'yes' ORDER BY LIMIT 11 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 11' at line 10

Thu, Jan 08 2004 12:46:19 +0100 /ubbthreads/postlist.php 195.240.225.132
Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_LastPosterId,t1.B_LastPostNum,t1.B_Poll,t1.B_CalDay FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'dreambox' AND t1.B_PosterId = t2.U_Number AND t1.B_Approved = 'yes' ORDER BY LIMIT 11 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 11' at line 10

Thu, Jan 08 2004 12:46:20 +0100 /ubbthreads/postlist.php 195.240.225.132
Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_LastPosterId,t1.B_LastPostNum,t1.B_Poll,t1.B_CalDay FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'dreambox' AND t1.B_PosterId = t2.U_Number AND t1.B_Approved = 'yes' ORDER BY LIMIT 11 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 11' at line 10

Thu, Jan 08 2004 12:46:21 +0100 /ubbthreads/postlist.php 195.240.225.132
Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_LastPosterId,t1.B_LastPostNum,t1.B_Poll,t1.B_CalDay FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'dreambox' AND t1.B_PosterId = t2.U_Number AND t1.B_Approved = 'yes' ORDER BY LIMIT 11 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 11' at line 10


Those who fail to read ask many questions:-)
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I'd double check.... you seem to have taken out too much.

See the query says ORDER BY
but doesn't have anything to sort by.

You are only removing the "t2." Not the whole bit.

Daine #266175 01/09/2004 10:15 AM
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
this is how it looks now. I took this from ubbcentral in the bugfix topic .
--------------------------------------
// --------------------------------------------------------------------
// If dateslip is on, we sort by Last_Post, otherwise we sort by Posted
if (!$config['dateslip']) {
$sort_opt = array(
1 => 'B_Sticky DESC,B_Subject DESC',
2 => 'B_Sticky DESC,B_Subject ASC',
// 3 => 'B_Sticky DESC,t2.U_Username DESC',
// 4 => 'B_Sticky DESC,t2.U_Username ASC',
3 => 'B_Sticky DESC,B_Posterid DESC',
4 => 'B_Sticky DESC,B_Posterid ASC',
5 => 'B_Sticky DESC,B_Posted DESC',
6 => 'B_Sticky DESC,B_Posted ASC',
7 => 'B_Sticky DESC,B_Counter DESC',
8 => 'B_Sticky DESC,B_Counter ASC',
9 => 'B_Sticky DESC,B_Replies DESC',
10 => 'B_Sticky DESC,B_Replies ASC',
11 => 'B_Sticky DESC,B_RealRating DESC',
12 => 'B_Sticky DESC,B_RealRating ASC'
);
$sort_by = $sort_opt[$sb];
if (!$sort_by) { $sort_by = "B_Posted DESC"; }
}
else {
$sort_opt = array(
1 => 'B_Sticky DESC,B_Subject DESC',
2 => 'B_Sticky DESC,B_Subject ASC',
// 3 => 'B_Sticky DESC,t2.U_Username DESC',
// 4 => 'B_Sticky DESC,t2.U_Username ASC',
3 => 'B_Sticky DESC,B_Posterid DESC',
4 => 'B_Sticky DESC,B_Posterid ASC',
5 => 'B_Sticky DESC,B_Last_Post DESC',
6 => 'B_Sticky DESC,B_Last_Post ASC',
7 => 'B_Sticky DESC,B_Counter DESC',
8 => 'B_Sticky DESC,B_Counter ASC',
9 => 'B_Sticky DESC,B_Replies DESC',
10 => 'B_Sticky DESC,B_Replies ASC',
11 => 'B_Sticky DESC,B_RealRating DESC',
12 => 'B_Sticky DESC,B_RealRating ASC'
);
$sort_by = $sort_opt[$sb];
if(!$sort_by) {$sort_by = "B_Last_Post DESC";}
}


Those who fail to read ask many questions:-)
Sponsored Links
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
I canged the modification from the above to:

// 3 => 'B_Sticky DESC,t2.U_Username DESC',
// 4 => 'B_Sticky DESC,t2.U_Username ASC',
3 => 'B_Sticky DESC,U_Username DESC',
4 => 'B_Sticky DESC,U_Username ASC',

and now I get different errors.
Can someone please be clear about what EXACTLY needs to be modified?


Fri, Jan 09 2004 23:01:54 +0100 /ubbthreads/showflat.php 81.204.232.133
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB23' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,U_Username DESC LIMIT 159, 12 - Unknown column 'U_Username' in 'order clause'

Fri, Jan 09 2004 23:01:57 +0100 /ubbthreads/showflat.php 81.204.232.133
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB23' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,U_Username DESC LIMIT 159, 12 - Unknown column 'U_Username' in 'order clause'

Fri, Jan 09 2004 23:25:42 +0100 /ubbthreads/showflat.php 172.178.145.44
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB10' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,U_Username DESC LIMIT 79, 12 - Unknown column 'U_Username' in 'order clause'

Fri, Jan 09 2004 23:25:43 +0100 /ubbthreads/showflat.php 172.178.145.44
Unable to do_query: SELECT B_Number FROM w3t_Posts WHERE B_Topic = 1 AND B_Board = 'UBB10' AND B_Approved = 'yes' ORDER BY B_Sticky DESC,U_Username DESC LIMIT 79, 12 - Unknown column 'U_Username' in 'order clause'


Those who fail to read ask many questions:-)
Joined: Oct 1999
Posts: 282
Enthusiast
Enthusiast
Offline
Joined: Oct 1999
Posts: 282
You have to replace t2.U_Username with B_Posterid. Affected are 4 lines.

3 => 'B_Sticky DESC,B_Posterid DESC',
4 => 'B_Sticky DESC,B_Posterid ASC',

mcse007 #266178 01/10/2004 7:55 PM
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
As mentioned in my previous posting I did that the first time but then I still get these errors:
----
Thu, Jan 08 2004 12:46:18 +0100 /ubbthreads/postlist.php 195.240.225.132
Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_LastPosterId,t1.B_LastPostNum,t1.B_Poll,t1.B_CalDay FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'dreambox' AND t1.B_PosterId = t2.U_Number AND t1.B_Approved = 'yes' ORDER BY LIMIT 11 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 11' at line 10

Thu, Jan 08 2004 12:46:19 +0100 /ubbthreads/postlist.php 195.240.225.132
Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_LastPosterId,t1.B_LastPostNum,t1.B_Poll,t1.B_CalDay FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'dreambox' AND t1.B_PosterId = t2.U_Number AND t1.B_Approved = 'yes' ORDER BY LIMIT 11 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 11' at line 10

Thu, Jan 08 2004 12:46:20 +0100 /ubbthreads/postlist.php 195.240.225.132
Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_LastPosterId,t1.B_LastPostNum,t1.B_Poll,t1.B_CalDay FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'dreambox' AND t1.B_PosterId = t2.U_Number AND t1.B_Approved = 'yes' ORDER BY LIMIT 11 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 11' at line 10

Thu, Jan 08 2004 12:46:21 +0100 /ubbthreads/postlist.php 195.240.225.132
Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_LastPosterId,t1.B_LastPostNum,t1.B_Poll,t1.B_CalDay FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'dreambox' AND t1.B_PosterId = t2.U_Number AND t1.B_Approved = 'yes' ORDER BY LIMIT 11 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 11' at line 10

--------------------


Those who fail to read ask many questions:-)
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
this is how it looks now.
--------------------------------------
// --------------------------------------------------------------------
// If dateslip is on, we sort by Last_Post, otherwise we sort by Posted
if (!$config['dateslip']) {
$sort_opt = array(
1 => 'B_Sticky DESC,B_Subject DESC',
2 => 'B_Sticky DESC,B_Subject ASC',
// 3 => 'B_Sticky DESC,t2.U_Username DESC',
// 4 => 'B_Sticky DESC,t2.U_Username ASC',
3 => 'B_Sticky DESC,B_Posterid DESC',
4 => 'B_Sticky DESC,B_Posterid ASC',
5 => 'B_Sticky DESC,B_Posted DESC',
6 => 'B_Sticky DESC,B_Posted ASC',
7 => 'B_Sticky DESC,B_Counter DESC',
8 => 'B_Sticky DESC,B_Counter ASC',
9 => 'B_Sticky DESC,B_Replies DESC',
10 => 'B_Sticky DESC,B_Replies ASC',
11 => 'B_Sticky DESC,B_RealRating DESC',
12 => 'B_Sticky DESC,B_RealRating ASC'
);
$sort_by = $sort_opt[$sb];
if (!$sort_by) { $sort_by = "B_Posted DESC"; }
}
else {
$sort_opt = array(
1 => 'B_Sticky DESC,B_Subject DESC',
2 => 'B_Sticky DESC,B_Subject ASC',
// 3 => 'B_Sticky DESC,t2.U_Username DESC',
// 4 => 'B_Sticky DESC,t2.U_Username ASC',
3 => 'B_Sticky DESC,B_Posterid DESC',
4 => 'B_Sticky DESC,B_Posterid ASC',
5 => 'B_Sticky DESC,B_Last_Post DESC',
6 => 'B_Sticky DESC,B_Last_Post ASC',
7 => 'B_Sticky DESC,B_Counter DESC',
8 => 'B_Sticky DESC,B_Counter ASC',
9 => 'B_Sticky DESC,B_Replies DESC',
10 => 'B_Sticky DESC,B_Replies ASC',
11 => 'B_Sticky DESC,B_RealRating DESC',
12 => 'B_Sticky DESC,B_RealRating ASC'
);
$sort_by = $sort_opt[$sb];
if(!$sort_by) {$sort_by = "B_Last_Post DESC";}
}


Those who fail to read ask many questions:-)
Joined: Oct 1999
Posts: 282
Enthusiast
Enthusiast
Offline
Joined: Oct 1999
Posts: 282
not sure about this, but is it possible to place comments INSIDE an array declaration? Try to remove the //comment lines. Just an idea...


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)