Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unknown column in 'field list'


sirblack

Recommended Posts

I have added a number of additional columns in MySQL and edited the categories.php to include fields for these new columns.

 

The problem is that when I try to load the "New Product" page I get an error. It's not a PHP error, the code seems to be fine; instead, it's a TEP error that reads as follows:

 

1054 - Unknown column 'products_description_short' in 'field list'

 

select products_description_short from products_description where products_id = '0' and language_id = '1'

 

[TEP STOP]

 

The error occurs as soon as the page reaches the new fields that I added. In the case above, the new colum is 'products_description_short'. One of the things that I'm confused about is this 'field list' that the message refers to. I don't know what it is. Can someone clarify?

 

Is there some sort of declaration that I missed in the code, or is it a problem associated with MySQL.

 

If anyone can help me work through this issue, that would be very much appreciated. Thanks.

Link to comment
Share on other sites

It means that there is an SQL query that you are trying to execute against your MySQL database which refers to a column in a table that does not exist.

 

You need to alter the products_description table to include a products_description_short field.

 

This error is caused by improperly adding a contribution without completly following the directions.

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

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

All of the columns exist in the MySQL database, I have double checked the spelling of each, and made sure that they're in the proper table.

 

Could it possibly have something to do with the fact that the field uses the 'language_id' column?

 

This is not a contribution. This is a job I did on my own, so I'm quite positive that all of the code is very much correct.

Link to comment
Share on other sites

Oh, wow.. Please disregard that last statement. I'm a moron (but I suppose that 2:00am in the morning will do that to you ^_^)

 

Err, The MySQL Columns did exist, which is why I was confused, but upon further investigation, I noticed that the naming scheme wasn't correct. Silly Mistake on My part. Apparently double checking isn't enough; but, as they say, "Third Time's the charm"

 

Thanks for your help.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...