Forums / General Questions / 1054 error shop was working fine -

1054 error shop was working fine -

Locked

Views: 1,288

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
3 Oct 2007, 12:42 PM
#1
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

1054 error shop was working fine -

Hi
I have the following problem, the shop has been working fine but suddenly it throws up this error I also get 1054 error when I try and enter the admin area. Presumably it has something to do with product catergories Can anyone please tell me how I can fix the problem ?

"1054 Unknown column 'c.parent_id' in 'where clause'
in:
[select cd.categories_name from categories c, categories_description cd where c.parent_id = 0 and c.categories_id = cd.categories_id and cd.language_id='1' and c.categories_status=1]"
Many Thanks

3 Oct 2007, 1:07 PM
#2
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: 1054 error shop was working fine -

did your host upgrade to mysql 5

Zen cart PCI compliant Hosting

3 Oct 2007, 1:43 PM
#3
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: 1054 error shop was working fine -

Thanks for the reply.
Not quite sure if they have upgraded but mySql is version5 so it's possible
Is there something I can do for a quick fix?
Thanks

3 Oct 2007, 7:00 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1054 error shop was working fine -

What version of Zen Cart?
What addons/contributions do you have installed?
Does this only happen when trying to get to the admin home page?
Is the storefront affected in any way?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Oct 2007, 8:03 PM
#5
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: 1054 error shop was working fine -

Version is 1.3.0.2
Has been working fine.
No addons etc apart form easy populate but that has been on for sometime.
1054 error effects admin and shop

Any help appreciated, thanks,
Ps The domain has another zen shop version1.3.7.1 and it's not effected, I was hoping not to upgrade the old shop.

3 Oct 2007, 9:42 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1054 error shop was working fine -

What is the structure of your "categories" table?
How many entries are in it?

You'll likely need to use phpMyAdmin to view that information.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Oct 2007, 10:33 PM
#7
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: 1054 error shop was working fine -

Hi
It seems that in catergories_description there are only 9 but the table for catergories has nothing in it and is different in the shop version 1.3.7.1 also on the domain.
So can I use the catergories table from 1.3.7.1 to replace the catergories table from 1.3.0.2 or will this just create another problem?
Thanks for the reply

3 Oct 2007, 10:57 PM
#8
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: 1054 error shop was working fine -

Progress
I think the database in part has become corrupt if that's the right terminology
I have replaced the table categorise with the one that came with the install of that version and the shop is working.
However now I see that the admin sector is showing a different error
"1054 Unknown column 'admin_name' in 'where clause'
in:
[select * from admin where admin_name='demo' or admin_name='Admin']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields."

Presumably this might also be a mySql problem?? Any ideas would be appreciated. Thanks for the help so far :smile:

3 Oct 2007, 11:45 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1054 error shop was working fine -

This sounds like a serious database problem.

I recommend that you restore your broken database from a backup. Not from your 1.3.7 database, but from a backup of the database that's having problems.

You should never mix database components from different versions without knowing exactly what you're doing and are certain they are 100% compatible.

It looks like you've not only lost "structure", but most likely also the data related to several of your tables.

I hope you and/or your hosting company have been making regular backups.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Oct 2007, 12:35 AM
#10
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: 1054 error shop was working fine -

Thanks for the help and you pointed me in the right direction. I have found out what has happened a new php script has been loaded to the site requiring tables in the database. At least two of the tables overwrote two of the zen cart tables admin and categories. I have restored the categories and the shop appears to be fine again but need to sort out the login and password for the admin area.
Guess it's a good lesson perhaps when loading tables a unique prefix to the table would have saved the problem.
Appreciate the help sorry if it's wasted your time as the issue was not one with Zen.
Thanks