Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1054 - Unknown column 's.public_flag' in 'where clause'


Annisse

Recommended Posts

Hello,

 

Need some help here. After installing the Attribute Sets Plus for osCommerce 2.2 MS2. I made a dummy customer account to test purchasing products on my actual store and when I go to MY ACCOUNT I get this error at the top of the page, any idea what this means and how to correct it?

 

Thank you,

~Annissë

 

 

1054 - Unknown column 's.public_flag' in 'where clause'

 

select count(*) as total from orders o, orders_status s where o.customers_id = '4' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1'

 

[TEP STOP]

Edited by Annisse
Link to comment
Share on other sites

It means a field it expects to be in the order_status table is not there.

 

Did you run the sql that probably came with the contribution?

 

Check the installation instructions and follow any omitted steps.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

It means a field it expects to be in the order_status table is not there.

 

Did you run the sql that probably came with the contribution?

 

Check the installation instructions and follow any omitted steps.

 

 

Yes I am looking over the Attribute Sets Plus for osCommerce 2.2 MS2 install and found this EXTRAS folder for an upgrade. I did a search in there and found some of the coding causing the error. I am going over the install again.

 

Thank you for your help,

~A

Link to comment
Share on other sites

Yes I am looking over the Attribute Sets Plus for osCommerce 2.2 MS2 install and found this EXTRAS folder for an upgrade. I did a search in there and found some of the coding causing the error. I am going over the install again.

 

Thank you for your help,

~A

 

Alright, just followed the osCommerce Online Merchant v2.2 RC2 Upgrade Notes. for the -

 

[AC] Introduce public orders and downloads status flags and I am still receiving the error.

 

I found these upgrade notes within the contribution, did a seach for one of the words in my error which was 's.public_flag' and then found which PHP pages I needed to edit.

 

I edited all the files correctly and I am still getting the exact same error.

 

Very frustrated now. Anyone have any other sugguestions to please give me to resolve this?

 

Also, do you need to install everything in the osCommerce Online Merchant v2.2 RC2 Upgrade Notes to get one error to work?

 

 

Thank you,

~A

Edited by Annisse
Link to comment
Share on other sites

Go into phpmyadmin and check if the table order_status exists.

 

If it does check if the field public_flag exists.

 

If they both do then it is aproblem with the sql, if they don't it is a problem with your data base.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Go into phpmyadmin and check if the table order_status exists.

 

If it does check if the field public_flag exists.

 

If they both do then it is aproblem with the sql, if they don't it is a problem with your data base.

I have the same problem. I'm missing the public_flag and downloads_flag from my orders_status table.

 

I've been having problems for the last week, when my host changed some server settings. I uploaded the new files but ran my backup, and obviously this is something new with the program.

 

Can someone post a sql query similar to the one I have, but with the 2 new fields?

 

DROP TABLE IF EXISTS `orders_status`;

CREATE TABLE `orders_status` (

`orders_status_id` int(11) NOT NULL default '0',

`language_id` int(11) NOT NULL default '1',

`orders_status_name` varchar(32) NOT NULL default '',

PRIMARY KEY (`orders_status_id`,`language_id`),

KEY `idx_orders_status_name` (`orders_status_name`)

) TYPE=MyISAM;

 

I'm guessing that should fix the problem, if we insert the 2 missing fields? I could try myself, but I'm not that comfortable with sql queries yet.

 

TIA! :)

Link to comment
Share on other sites

orders_status s where o.customers_id = '4' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1

 

chek your db for a filed named public_flag,also chek that order_status table field has this table.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

I have the same problem. I'm missing the public_flag and downloads_flag from my orders_status table.

 

I've been having problems for the last week, when my host changed some server settings. I uploaded the new files but ran my backup, and obviously this is something new with the program.

 

Can someone post a sql query similar to the one I have, but with the 2 new fields?

I'm guessing that should fix the problem, if we insert the 2 missing fields? I could try myself, but I'm not that comfortable with sql queries yet.

 

TIA! :)

 

 

Upgrade http://www.oscommerce.com/forums/index.php?showtopic=289553

Link to comment
Share on other sites

Hello,

 

Need some help here. After installing the Attribute Sets Plus for osCommerce 2.2 MS2. I made a dummy customer account to test purchasing products on my actual store and when I go to MY ACCOUNT I get this error at the top of the page, any idea what this means and how to correct it?

 

Thank you,

~Annissë

1054 - Unknown column 's.public_flag' in 'where clause'

 

select count(*) as total from orders o, orders_status s where o.customers_id = '4' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1'

 

[TEP STOP]

 

Run this SQL statement to fix your issue. This will create the table elements that are missing.

 

alter table orders_status add public_flag int DEFAULT '1';

alter table orders_status add downloads_flag int DEFAULT '0';

Link to comment
Share on other sites

Run this SQL statement to fix your issue. This will create the table elements that are missing.

 

alter table orders_status add public_flag int DEFAULT '1';

alter table orders_status add downloads_flag int DEFAULT '0';

 

 

I have the same problem, need help, I have followed every single step for upgrade and from the post, no use need help to fix this issue

Edited by Jan Zonjee
Link to comment
Share on other sites

  • 2 months later...
Run this SQL statement to fix your issue. This will create the table elements that are missing.

 

alter table orders_status add public_flag int DEFAULT '1';

alter table orders_status add downloads_flag int DEFAULT '0';

 

Thanks worked or me.

Link to comment
Share on other sites

  • 1 month later...
Run this SQL statement to fix your issue. This will create the table elements that are missing.

 

alter table orders_status add public_flag int DEFAULT '1';

alter table orders_status add downloads_flag int DEFAULT '0';

 

 

Just googled up this fix and it works. B)

Link to comment
Share on other sites

  • 1 month later...
Run this SQL statement to fix your issue. This will create the table elements that are missing.

 

alter table orders_status add public_flag int DEFAULT '1';

alter table orders_status add downloads_flag int DEFAULT '0';

 

Just wanted to let people know that I had this same problem (June, 2008) and this was the solution. I installed an osC template which I got from templateworld.com. I ran the above queries in phpMyAdmin and it solved the problem. Thanks for this solution!

Link to comment
Share on other sites

  • 4 weeks later...
Run this SQL statement to fix your issue. This will create the table elements that are missing.

 

alter table orders_status add public_flag int DEFAULT '1';

alter table orders_status add downloads_flag int DEFAULT '0';

 

 

IT WORKED !!!! THANKS A MILLION! :)

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...
Run this SQL statement to fix your issue. This will create the table elements that are missing.

 

alter table orders_status add public_flag int DEFAULT '1';

alter table orders_status add downloads_flag int DEFAULT '0';

With this tweaking, it runs perfect. Thanks Philip! :D

Link to comment
Share on other sites

  • 3 months later...

alter table banners add index idx_banners_group (banners_group); alter table banners_history add index idx_banners_history_banners_id (banners_id); alter table currencies add index idx_currencies_code (code); alter table customers add index idx_customers_email_address (customers_email_address); alter table customers_basket add index idx_customers_basket_customers_id (customers_id); alter table customers_basket_attributes add index idx_customers_basket_att_customers_id (customers_id); alter table orders add index idx_orders_customers_id (customers_id); alter table orders_products add index idx_orders_products_orders_id (orders_id); alter table orders_products add index idx_orders_products_products_id (products_id); alter table orders_status_history add index idx_orders_status_history_orders_id (orders_id); alter table orders_products_attributes add index idx_orders_products_att_orders_id (orders_id); alter table orders_products_download add index idx_orders_products_download_orders_id (orders_id); alter table products add index idx_products_model (products_model); alter table products_attributes add index idx_products_attributes_products_id (products_id); alter table reviews add index idx_reviews_products_id (products_id); alter table reviews add index idx_reviews_customers_id (customers_id); alter table specials add index idx_specials_products_id (products_id); alter table zones add index idx_zones_to_geo_zones_country_id (zone_country_id); alter table orders_status add public_flag int DEFAULT '1'; alter table orders_status add downloads_flag int DEFAULT '0'; alter table orders modify payment_method varchar(255) NOT NULL; alter table whos_online modify last_page_url text NOT NULL;

 

Worked perfectly for me.

 

CLI

----

1. Log into your server using PuTTY

2. At the command line type 'mysql -p'

3. Present credentials appropriate to mysql

4. Type 'show databases;'

5. Identify the database you need to alter (<database>)

6. Type 'connect <database>'

7. Paste the big SQL above into MySQL using a right-click of the mouse

8. Press <Enter>

 

DONE

 

 

PHPMYADMIN

---------------

1. Surf to your PHPMyAdmin URL

2. Present credentials (you did secure the installation, right?)

3. Select appropriate database by clicking on it

4. Click on "SQL" tab at top of display

5. Paste the big SQL above into MySQL using a right-click of the mouse, then selecting "paste"

6. Click on "GO"

 

DONE

Link to comment
Share on other sites

  • 10 months later...

hey every1! I tried entering

alter table orders_status add public_flag int DEFAULT '1';

alter table orders_status add downloads_flag int DEFAULT '0';

 

but I get the following error

 

Failed to execute SQL : SQL alter table orders_status add public_flag int DEFAULT '1'; alter table orders_status add downloads_flag int DEFAULT '0' failed : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'alter table orders_status add downloads_flag int DEFAULT '0'' at line 1

 

any suggestions?

Link to comment
Share on other sites

  • 6 months later...

Run this SQL statement to fix your issue. This will create the table elements that are missing.

 

alter table orders_status add public_flag int DEFAULT '1';

alter table orders_status add downloads_flag int DEFAULT '0';

 

 

Beautiful Worked and fixed my problem when trying to use my old DB

 

Thanks alot :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...