Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / 1054 Unknown column 'zen_order_id' in 'where clause'

1054 Unknown column 'zen_order_id' in 'where clause'

Locked

Views: 1,563

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
23 Feb 2010, 4:11 PM
#1
jdmengineland avatar

jdmengineland

New Zenner

Join Date:
Feb 2010
Posts:
11
Plugin Contributions:
0

1054 Unknown column 'zen_order_id' in 'where clause'

I know this has been discussed...

This is the problem im having

1054 Unknown column 'zen_order_id' in 'where clause'
in:
[select * from zen_paypal where zen_order_id = 5 AND parent_txn_id = '' ]
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.

Zen Cart 1.3.8a
Patch: 1::
Database Patch Level: 1.3.8

PayPal Website Payments Pro (v1.3.8a)

PayPal Express Checkout (v0.1b)

PayPal IPN (Basic PayPal service)

23 Feb 2010, 4:13 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,617
Plugin Contributions:
0

Re: 1054 Unknown column 'zen_order_id' in 'where clause'

First, you don't need all three PayPal modules installed, turn off the PayPal Standard (IPN)

Next scroll down the page to the Similar Threads section . There should be a solution in one of them.

23 Feb 2010, 4:19 PM
#3
jdmengineland avatar

jdmengineland

New Zenner

Join Date:
Feb 2010
Posts:
11
Plugin Contributions:
0

Re: 1054 Unknown column 'zen_order_id' in 'where clause'

but the zen cart version is good, i went through all the similar posts just having trouble locating the solution, would you be able to help me...

Kim:

First, you don't need all three PayPal modules installed, turn off the PayPal Standard (IPN)

Next scroll down the page to the Similar Threads section . There should be a solution in one of them.

23 Feb 2010, 4:21 PM
#4
jdmengineland avatar

jdmengineland

New Zenner

Join Date:
Feb 2010
Posts:
11
Plugin Contributions:
0

Re: 1054 Unknown column 'zen_order_id' in 'where clause'

this fix worked...

ALTER TABLE paypal CHANGE order_id zen_order_id int(11) unsigned NOT NULL default '0';

23 Feb 2010, 5:26 PM
#5
jdmengineland avatar

jdmengineland

New Zenner

Join Date:
Feb 2010
Posts:
11
Plugin Contributions:
0

Re: 1054 Unknown column 'zen_order_id' in 'where clause'

the only problem im getting now is that it goes back to the original name...

after i do this...it works then somehow it changes back...and i gotta run the SQL again...

ALTER TABLE paypal CHANGE order_id zen_order_id int(11) unsigned NOT NULL default '0';

23 Feb 2010, 5:54 PM
#6
jdmengineland avatar

jdmengineland

New Zenner

Join Date:
Feb 2010
Posts:
11
Plugin Contributions:
0

Re: 1054 Unknown column 'zen_order_id' in 'where clause'

well i run this query in SQL Patches...

ALTER TABLE paypal CHANGE order_id zen_order_id int(11) unsigned NOT NULL default '0';

but it seems to go back to what it was before....

anyway to make it permenant...

23 Feb 2010, 7:28 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: 1054 Unknown column 'zen_order_id' in 'where clause'

The PHP files and the database work together. But if you change one without changing the other, you are likely to run into problems ... as demonstrated in your discussion.

In v1.3.8a, the field name is supposed to be order_id.
In v1.3.7 and older, it was zen_order_id.

So, the error you're getting proves that you're using some PHP files from v1.3.7 or older to run your site, but you've got a v1.3.8a database.
And the reset that's undoing your "fix" is happening as a result of some of your PHP files correctly being 1.3.8a files.

What you're reporting is a common occurrence for someone who has attempted an upgrade but missed one or more files, or someone who has attempted to install old patches to a newer version, or someone who has installed old addons to a newer version for which they are not compatible.

They way to "make it permanent" is to fix your mismatched PHP files as they exist on your server.