|
Joined: Apr 2002
Posts: 141
Member
|
Member
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:-)
|
|
|
|
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
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
Joined: Apr 2002
Posts: 141 |
Ok I'll check that out. Thanks.
Those who fail to read ask many questions:-)
|
|
|
|
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
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
Guru
Joined: May 1999
Posts: 3,039 |
No, only the one's referenced in the bug fix. 
UBB.threads Developer
|
|
|
|
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
|
|
|
|
Joined: Apr 2002
Posts: 141
Member
|
Member
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.
|
|
|
|
Joined: Apr 2002
Posts: 141
Member
|
Member
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:-)
|
|
|
|
Joined: Apr 2002
Posts: 141
Member
|
Member
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
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',
|
|
|
|
Joined: Apr 2002
Posts: 141
Member
|
Member
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
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
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...
|
|
|
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: 254
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|