Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Error! :-( Unknown column 'comments' in 'field list'


Recommended Posts

updated some cvs stuff and also made my changes to my database. Worked pretty good, or seemed to on my "test-bed" so I moved all the changes over to development site, etc.


Only real thing I did different is to delete the obsolete fields from the development sites database - specifically the "comments" entry in the "orders" table and the new_value/old value entries in the orders_status_history table. (I'm pretty sure I got the new tables and inserts added correctly too!)


Now when I go to admin and access "orders" I get the following:



2000 - Unknown column 'comments' in 'field list'


select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, comments, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '22'


I already checked the /catalog/includes/classes/order.php as I saw a change when the comments element was moved around but it seems to be ok. :(


So, can anybody give me an idea where this is coming from or what's up?




Thanks in advance!

Link to comment
Share on other sites

It's telling you that it can't find the "Comments" field in the "orders" table. Check your osC MYSQL "orders" table for a comments field. My guess is there isn't one there.


Good Luck.



Link to comment
Share on other sites

The comments field was moved from orders table to orders_status_history in oscommerce.sql v1.68 (Feb. 6).


Yep, exactly what I did when i did the cvs changes. I deleted it from orders and put a new one in orders_status history (I just double checked both.)


The problem is that it is still looking for the comments field in the orders table apparently. Where does it get this string from?


It "looks" like it comes from catalog/includes/order.php when called by catalog/order.php. The comments field has been removed from that as per the cvs but it still seems to be calling for it. :shock:

Link to comment
Share on other sites



Got it. Somehow I didn't transfer the updated admin/includes/classes/order.php (with the "comments" reference removed)


When I ran a folder search for the bad string the only one coming up that included that was in a backup copy of catalog/includes/classes/order.php. Right track, wrong place.


Apparently my test setup saw this "error" as being perfectly fine because I hadn't deleted that table from the db there.


It all made perfect sense ... once I woke up in the middle of the night. :sarcasm:


Thanks though!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...