Forums / General Questions / 1054 Unknown column 'p.products_id' in 'on clause'

1054 Unknown column 'p.products_id' in 'on clause'

Locked

Views: 3,723

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
23 Aug 2007, 4:02 PM
#1
pepsishot avatar

pepsishot

New Zenner

Join Date:
Aug 2007
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

1054 Unknown column 'p.products_id' in 'on clause'

1054 Unknown column 'p.products_id' in 'on clause'

I am getting this message on my website when trying to look at any product. All my categories are there but when you click on any of them to see product it's not there anymore.

I'm new and freaking out. :cry:

Everything was fine an hour ago!!!

What did I do??????

Someone PLEASE help me!!!

Amber

23 Aug 2007, 5:20 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: 1054 Unknown column 'p.products_id' in 'on clause'

Is the full SQL statement also being output with the error message?

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

23 Aug 2007, 6:09 PM
#3
pepsishot avatar

pepsishot

New Zenner

Join Date:
Aug 2007
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'p.products_id' in 'on clause'

kuroi:

Is the full SQL statement also being output with the error message?

I am very new here... I have no idea what you are asking... sorry.

The "1054 Unknown column 'p.products_id' in 'on clause'" message is the only thing you see when you click on a sub-category to see list of items.

I have found out that my host has upgraded to some 5.0 MySQL thing. (I think that is what it was called.)

I don't know if that has anything to do with this problem. I contacted them and they said they'd get back to me in 24-48 hours. In the meantime I am without a business. Not good for me.

Amber

23 Aug 2007, 6:34 PM
#4
pepsishot avatar

pepsishot

New Zenner

Join Date:
Aug 2007
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'p.products_id' in 'on clause'

kuroi,

I took my site off "down for maintenance" for the moment.

You can see what it does...

https://www.ambersscrapattic.com

That is if it even loads for you. That is another problem I'm working on.

Thank you, Amber

23 Aug 2007, 10:19 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: 1054 Unknown column 'p.products_id' in 'on clause'

What version of Zen Cart are you using ?
What addons/contributions are installed?

.
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.

23 Aug 2007, 11:07 PM
#6
pepsishot avatar

pepsishot

New Zenner

Join Date:
Aug 2007
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'p.products_id' in 'on clause'

Zen Cart 1.2.7

Old, I know. I have someone who is going to teach me to upgrade. I just don't understand it all yet. I need it broke down better for me.

But my server/host people just did something this morning I found out. I was hopeing they'd help but so far they haven't done much.

Thanks!!

Amber

23 Aug 2007, 11:18 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: 1054 Unknown column 'p.products_id' in 'on clause'

The following might provide some relief until you can get around to doing the upgrade (which should still be done as soon as possible if you're on MySQL5 now):

/includes/classes/db/mysql/query_factory.php
around line 41 you'll find:```
if ($this->link) {
if (@mysql_select_db($zf_database, $this->link)) {
$this->db_connected = true;
return true;
} else {


Insert an extra line as shown:```
    if ($this->link) {
      if (@mysql_select_db($zf_database, $this->link)) {
[B]        @mysql_query("SET SESSION sql_mode = ''", $this->link);[/B]
        $this->db_connected = true;
        return true;
      } else {

Doing this might be enough to tell MySQL 5 to ignore some of the strictness it normally enforces.

.
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.

23 Aug 2007, 11:38 PM
#8
pepsishot avatar

pepsishot

New Zenner

Join Date:
Aug 2007
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'p.products_id' in 'on clause'

Well... that did not work for me.

Thank you anyway. It was a good try.

Maybe once I learn to upgrade my cart things will get better.

Thanks, Amber

24 Aug 2007, 3:51 AM
#9
ocsand avatar

ocsand

New Zenner

Join Date:
Dec 2005
Location:
Maryland
Posts:
11
Plugin Contributions:
0

Re: 1054 Unknown column 'p.products_id' in 'on clause'

is your site hosted by powweb? they just upgraded their mySQL database to version 5 and it screwed up my cart with the same error message you are getting.

...joe
seaside stampin' ink
seasidestampin.com

24 Aug 2007, 2:14 PM
#10
pepsishot avatar

pepsishot

New Zenner

Join Date:
Aug 2007
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'p.products_id' in 'on clause'

Yes, I am with PowWeb. It would seem the cart I am using is to old to work with this MySQL 5.0 thing.

Sorry I don't really know what MySQL is, but we need to upgrade our Zen Cart.

This I now know.

Problem is I don't really understand how to upgrade my cart.

I need less computer words to explain it to me. :blink:

Amber

24 Aug 2007, 11:34 PM
#11
jhosford avatar

jhosford

New Zenner

Join Date:
Oct 2006
Posts:
10
Plugin Contributions:
0

Re: 1054 Unknown column 'p.products_id' in 'on clause'

I am with Powweb too and have exactly the same problem. I called and have a support ticket running. It was working fine late last night around 8p, and today it's dead. I am running a fully patched Ver 1.3.7

24 Aug 2007, 11:41 PM
#12
pepsishot avatar

pepsishot

New Zenner

Join Date:
Aug 2007
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'p.products_id' in 'on clause'

Here is what they sent me to hopefully help my issue. Maybe it will help you. I am hopeing mine is just my cart being out of date.

....In order to fix the issue, you need to redefine the Join query in the script or
could use some readymade fixing by searching in Search Engines. He can refer the
link 'http://www.zen-cart.com/forum/showthread.php?t=37460' for your ZenCart
application. Detailed MySQL documentation on 'Join':
http://dev.mysql.com/doc/refman/5.0/en/join.html....

Hope this helps someone!!!!

25 Aug 2007, 5:04 AM
#13
drbyte avatar

drbyte

Sensei

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

Re: 1054 Unknown column 'p.products_id' in 'on clause'

You have a few options:

  1. upgrade your site
  2. tell powweb you'd like to be put back onto a MySQL4 server until you have time to do an upgrade (if they never gave you any notice of the upgrade to MySQL 5, then you should have some leverage to get this).
  3. use the patches discussed in the wiki as a stop-gap. NOTE: You'll have to CAREFULLY merge all the changes into your site, esp if your site isn't running the exact same version as the patch was built for. NOTE: DO NOT CONSIDER THIS A COMPLETE SOLUTION ... there are MANY ... ie: LOTS of additional MySQL 5 fixes in the various v1.3.x releases.
    If you're going to run on a MySQL 5 server, you really do need to use Zen Cart v1.3.6 or higher.

This is not a situation to take lightly even if the 'patch' gives you some temporary relief.

Zen Cart v1.2.x was NOT designed for MySQL 5.

.
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.

25 Aug 2007, 11:35 AM
#14
pepsishot avatar

pepsishot

New Zenner

Join Date:
Aug 2007
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'p.products_id' in 'on clause'

Thank you all for your help here. I have upgraded my site and this problem is now gone. I am trying to fix the new cart with new issues but this one has been solved.

THANK YOU!!!!!

27 Aug 2007, 2:52 PM
#15
jhosford avatar

jhosford

New Zenner

Join Date:
Oct 2006
Posts:
10
Plugin Contributions:
0

Re: 1054 Unknown column 'p.products_id' in 'on clause'

Thanks for the input. I fixed the problem.

I had to reinstall from scratch. Even though my Zen was reporting V1.3.7 and never whined about updating, I obviously had an old file or two from a past upgrade left that was screwing things up. I reinstalled and connected back to my database and it was back. Of course I had to also reinstall all the modules too, but they mostly had their settings intact once the files were back in place.

Still fighting with SSL though ......