SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Coyote23
Registered User
Posts: 78
Joined: Thu Oct 05, 2006 8:55 pm
Location: Omaha, Nebraska

SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Coyote23 » Thu Mar 20, 2008 4:05 am

My provider just upgraded thier platform - but after my site was transitioned I get the following error when trying to enter a forum:
SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username, p3.poster_id AS my_reply_id FROM (phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_users u2 LEFT JOIN phpbb_posts p3 ON p3.topic_id = t.topic_id AND p3.poster_id = 2) WHERE t.forum_id = 2 AND t.topic_poster = u.user_id AND p.post_id = t.topic_last_post_id AND p.poster_id = u2.user_id AND t.topic_type = 2 GROUP BY p.post_id ORDER BY t.topic_last_post_id DESC

Line : 296
File : viewforum.php
If I go to a poster's profile and "FInd all posts by..." I can view that post. My site has been down 5 days and my provider's support team is providing no help at all.

Thanks.
Last edited by ric323 on Sun Mar 23, 2008 9:55 am, edited 1 time in total.
Reason: Topic icon changed

User avatar
Lumpy Burgertushie
Registered User
Posts: 66933
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Lumpy Burgertushie » Thu Mar 20, 2008 8:47 am

let me guess.... Ipowerweb.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
T0ny
Registered User
Posts: 1383
Joined: Sun Jan 29, 2006 8:42 pm
Location: Lancashire
Name: Tony

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by T0ny » Thu Mar 20, 2008 9:07 am

Try changing

Code: Select all

FROM (phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_users u2 LEFT JOIN phpbb_posts p3 ON p3.topic_id = t.topic_id AND p3.poster_id = 2) WHERE
to

Code: Select all

FROM (phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_users u2) LEFT JOIN phpbb_posts p3 ON p3.topic_id = t.topic_id AND p3.poster_id = 2 WHERE

Coyote23
Registered User
Posts: 78
Joined: Thu Oct 05, 2006 8:55 pm
Location: Omaha, Nebraska

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Coyote23 » Thu Mar 20, 2008 1:59 pm

Lumpy Burgertushie wrote:let me guess.... Ipowerweb.
Yep the one and only. It has been 6 days now and no help. Last time I was down it took them 3 weeks to figure things out, I have a large forum database that they have queries/hour limits...

Coyote23
Registered User
Posts: 78
Joined: Thu Oct 05, 2006 8:55 pm
Location: Omaha, Nebraska

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Coyote23 » Thu Mar 20, 2008 2:29 pm

T0ny wrote:Try changing...
Thanks T0ny - but I basically get the same error message with the parentheses in the new position:
SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username, p3.poster_id AS my_reply_id FROM (phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_users u2 LEFT JOIN phpbb_posts p3 ON p3.topic_id = t.topic_id AND p3.poster_id = -1) WHERE t.forum_id = 20 AND t.topic_poster = u.user_id AND p.post_id = t.topic_last_post_id AND p.poster_id = u2.user_id AND t.topic_type = 2 GROUP BY p.post_id ORDER BY t.topic_last_post_id DESC

Line : 296
File : viewforum.php

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50926
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by stevemaury » Thu Mar 20, 2008 2:36 pm

Habe you used phpMyAdmin to look at the database and confirm that there is a topic_id field in the topics table and the its datatype is mediumint(8) and that it has an auto-increment property?
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Coyote23
Registered User
Posts: 78
Joined: Thu Oct 05, 2006 8:55 pm
Location: Omaha, Nebraska

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Coyote23 » Thu Mar 20, 2008 2:48 pm

Oops - wrong line - but still needed the change to the second instance.
Thank you so much T0ny. You are a life saver and all my friends at eOmahaForums will also be in debt to you!
You guys are the best!!!

Coyote23
Registered User
Posts: 78
Joined: Thu Oct 05, 2006 8:55 pm
Location: Omaha, Nebraska

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Coyote23 » Thu Mar 20, 2008 2:53 pm

stevemaury wrote:Habe you used phpMyAdmin to look at the database and confirm that there is a topic_id field in the topics table and the its datatype is mediumint(8) and that it has an auto-increment property?
Yes I did. That is why I knew something else was wrong. But thanks for the suggestion Steve. We are up and running again.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66933
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Lumpy Burgertushie » Thu Mar 20, 2008 5:48 pm

Coyote23 wrote:
stevemaury wrote:Habe you used phpMyAdmin to look at the database and confirm that there is a topic_id field in the topics table and the its datatype is mediumint(8) and that it has an auto-increment property?
Yes I did. That is why I knew something else was wrong. But thanks for the suggestion Steve. We are up and running again.
now, be smart, start looking for a new host. Ipowerweb is in the top 3 worst hosts in the world.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Coyote23
Registered User
Posts: 78
Joined: Thu Oct 05, 2006 8:55 pm
Location: Omaha, Nebraska

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Coyote23 » Thu Mar 20, 2008 5:54 pm

Lumpy Burgertushie wrote:now, be smart, start looking for a new host. Ipowerweb is in the top 3 worst hosts in the world.
And now I know why. Is their a list of hosts here that people recommend - particularly one that could transfer all my files for me ;)

Thanks for everyone's help!!! You guys came through again for me.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50926
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by stevemaury » Thu Mar 20, 2008 6:00 pm

For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Coyote23
Registered User
Posts: 78
Joined: Thu Oct 05, 2006 8:55 pm
Location: Omaha, Nebraska

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Coyote23 » Thu Mar 20, 2008 6:34 pm

Thanks Steve!

moodgard
Registered User
Posts: 316
Joined: Sun Feb 08, 2004 8:05 pm

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by moodgard » Sun Mar 23, 2008 4:05 am

I went to that site, and it had a banner ad for ipowerweb!

I go to http://www.webhostingtalk.com , it's massive; maybe that's the one you meant.

Rafter
Registered User
Posts: 17
Joined: Sat Dec 25, 2004 11:51 am
Location: Southern District of Maribor
Contact:

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Rafter » Sun Sep 14, 2008 8:29 pm

Lumpy, hi again. :D

I saw that smbdy had equal problem as me - and, how funny, almost the same avatar as me. :)))))))))

I*ll try the same solution as you suggested him.

Hear you soon.
rafter@siol.net ; www.rafting-klub-mb.si; +386 41 757-257, +386 40 757-257
Try www.raftingnamuri.com FREE!

Rafter
Registered User
Posts: 17
Joined: Sat Dec 25, 2004 11:51 am
Location: Southern District of Maribor
Contact:

Re: SQL Error : 1054 Unknown column 't.topic_id' in 'on clause'

Post by Rafter » Sun Sep 14, 2008 8:33 pm

BTW, my host is Hostgator (Texas, USA).
rafter@siol.net ; www.rafting-klub-mb.si; +386 41 757-257, +386 40 757-257
Try www.raftingnamuri.com FREE!

Locked

Return to “2.0.x Support Forum”