Zen Cart Logo
Forums / General Questions / 1054 Unknown column 'c.parent_id' in 'on clause'

1054 Unknown column 'c.parent_id' in 'on clause'

Locked

Views: 4,754

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
20 Jan 2008, 11:15 AM
#1
darocket avatar

darocket

New Zenner

Join Date:
Aug 2006
Posts:
19
Plugin Contributions:
0

1054 Unknown column 'c.parent_id' in 'on clause'

Hey all,
Man, I have a huge problem and don't know how to solve it. Well, Im getting this error everytime I go to my store https://www.your-lovely-home.com

1054 Unknown column 'c.parent_id' in 'on clause'
in:
[SELECT c.categories_id as id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName FROM zen_categories c, zen_categories_description cd LEFT JOIN zen_categories_description cd2 ON c.parent_id=cd2.categories_id AND cd2.language_id='1' WHERE c.categories_id=cd.categories_id AND cd.language_id='1']

This problem happened sometime after:

  1. Ive installed the simple google analytics 1.2.0 upgrade
  2. Ive installed the the quick updates 2.04 module

Those are the only things ive recently done to my website. This is what I've done to try and fix the problem:

  1. Ive gone to a backup db and that didn't work
  2. I was running 1.3.7 so I've upgraded to 1.3.8 didn't work

So now Im going to delete the files added from both modules and see if that fixes the problem.

Any help would be much appreciated. I've noticed people had similar problems with this in the forum, but I do not know what causes it and how to fix it.. This is a first for me.

Thanks all
David

20 Jan 2008, 1:22 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: 1054 Unknown column 'c.parent_id' in 'on clause'

You are on the right path - try to remove the mods one at a time &/or if you have your own template and followed the override system switch to contempoary green(classic) and see if the issue persists

20 Jan 2008, 1:39 PM
#3
darocket avatar

darocket

New Zenner

Join Date:
Aug 2006
Posts:
19
Plugin Contributions:
0

Re: 1054 Unknown column 'c.parent_id' in 'on clause'

kobra:

You are on the right path - try to remove the mods one at a time &/or if you have your own template and followed the override system switch to contempoary green(classic) and see if the issue persists

Well, I fixed it. The problem was that SEO module. Man, that thing gives me a hard time. I had it disabled for a long time since it gave me a problem a while back. But I guess disabling does not always fix future problems. So, I went in and deleted every file that it created. Now the problem is fixed...Thanks all though.:clap:

21 Jan 2008, 11:21 AM
#4
darocket avatar

darocket

New Zenner

Join Date:
Aug 2006
Posts:
19
Plugin Contributions:
0

Re: 1054 Unknown column 'c.parent_id' in 'on clause'

So now that I've deleted every file that I've found for SEO URLs, the menu item still appears in my Configuration menu in the Admin area. How do I go about removing old items??

7 Jun 2009, 7:18 PM
#5
signs avatar

signs

Zen Follower

Join Date:
Jun 2006
Posts:
128
Plugin Contributions:
0

Re: 1054 Unknown column 'c.parent_id' in 'on clause'

Thank you so much for posting about this issue AND how you fixed it. My web host pointed me to this thread after telling me they couldn't fix it for me, but removing the SEO url mod files fixed it good as new.

The mod never reallly worked for me (it's been installed for a few years now and inactivated due to not working right). Just out of curiosity I tried it out again last week and it still didn't work right so I turned it back off.

Everything was fine until I added a new product today. As soon as I clicked the button to add the product, I lost front and back end.

Anyhow, after reading this thread and carefully removing all files relating to the SEO URLs, I'm back in business. Thanks again!

18 Jun 2009, 7:17 AM
#6
frank_lyy avatar

frank_lyy

New Zenner

Join Date:
Sep 2006
Posts:
38
Plugin Contributions:
0

Re: 1054 Unknown column 'c.parent_id' in 'on clause'

darocket:

Well, I fixed it. The problem was that SEO module. Man, that thing gives me a hard time. I had it disabled for a long time since it gave me a problem a while back. But I guess disabling does not always fix future problems. So, I went in and deleted every file that it created. Now the problem is fixed...Thanks all though.:clap:
To all folks out there still having trouble with "1054 Unknown column 'c.parent_id' in 'on clause'", you should read all posts on this subject to get the customized solutions to individual problems.

For me, it was the SEO URL Mod. But, I found out that there is nothing wrong with this mod. The real culprit is Mysql data base queries. Once your host upgrade sql database to 5.x, you need to fix your sql queries in your catalog/admin files accordingly. I strongly recommend everyone to install "Developer Tool Kit" mod. I found solution to my problem through this mod. Here is fix to SEO URL queries for my store:

Locate file - public_html/includes/classes/seo.url.php
at around lin 910, Change the following code:

$sql = "SELECT c.categories_id as id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName
FROM ".TABLE_CATEGORIES." c,
".TABLE_CATEGORIES_DESCRIPTION." cd
LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION."

to :

$sql = "SELECT c.categories_id as id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName
FROM (".TABLE_CATEGORIES." c,
".TABLE_CATEGORIES_DESCRIPTION." cd)

LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION."

Problem solved! SEO URL mod is a cool mod, there is nothing wrong with using it.

19 Sep 2009, 1:47 PM
#7
shqipo avatar

shqipo

New Zenner

Join Date:
Apr 2006
Posts:
94
Plugin Contributions:
0

Re: 1054 Unknown column 'c.parent_id' in 'on clause'

Thank you so much! That did it! I was pulling my hair trying to figure it out why suddenly, after 2+ years of working fine, my site broke down. Apparently my host upgraded their MySQL and didn't bother to tell anyone.

18 Dec 2009, 4:44 AM
#8
sparrish avatar

sparrish

New Zenner

Join Date:
Sep 2005
Posts:
67
Plugin Contributions:
0

Re: 1054 Unknown column 'c.parent_id' in 'on clause'

THANK YOU!!! This extremely helpful explanation saved me a lot of headache.

26 Dec 2009, 11:42 AM
#9
life avatar

life

New Zenner

Join Date:
Feb 2008
Posts:
4
Plugin Contributions:
0

Re: 1054 Unknown column 'c.parent_id' in 'on clause'

great fixed my issue as well in two seconds

21 Jul 2010, 2:56 AM
#10
ztotheetothen avatar

ztotheetothen

Zen Follower

Join Date:
Oct 2006
Location:
Los Angeles
Posts:
111
Plugin Contributions:
0

Re: 1054 Unknown column 'c.parent_id' in 'on clause'

thank you so much for this post. i can't believe that my dedicated server company, Server Pronto, upgraded mysql without telling me and it broke my website completely.

wow, this is a third event that caused my site to go down, all instances responsibility of server pronto. They had "a failed cable" and also "HDD issues" , unbelievably bad server company. horrible, please nobody sign up for any services from server pronto! They have good prices, but bad service. BEWARE: http://www.serverpronto.com