Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1054 Error


Guest

Recommended Posts

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

 

select customers_firstname, customers_lastname from customers where customers_id = '46'

 

[TEP STOP]

 

 

For some bizarre reason only known to me I have removed all feilds from the create account page and replaced them with

 

customers_username ~ User name

customers_email_address ~ E-Mail Address

 

Customer table now looks like below

 

customers_id

customers_email_address

customers_default_address_id

customers_password

customers_newsletter

customers_username

 

Anyone Know how I can fix it? I have found some code which relates to it, I think, in \pkg\upgrade_3

 

$reviews_query = osc_db_query("select r.reviews_id, re.products_id, re.customers_id, r.reviews_rating, re.date_added, re.reviews_read, r.reviews_text from reviews r, reviews_extra re where r.reviews_id = re.reviews_id order by r.reviews_id");

while ($reviews = osc_db_fetch_array($reviews_query)) {

$customer_query = osc_db_query("select customers_firstname, customers_lastname from customers where customers_id = '" . $reviews['customers_id'] . "'");

if (osc_db_num_rows($customer_query)) {

$customer = osc_db_fetch_array($customer_query);

$customers_name = $customer['customers_firstname'] . ' ' . $customer['customers_lastname'];

} else {

$customers_name = '';

}

 

Many thanks

 

Russell

Link to comment
Share on other sites

For some bizarre reason only known to me I have removed all feilds from the create account page and replaced them with

well with this, dont know what else to say other than replace the code with original

Link to comment
Share on other sites

well with this, dont know what else to say other than replace the code with original

 

But what is it trying to do? It is looking for fields that are not there, I can cure it by putting the fields back but that is not a real solution as it leaves unwanted code fields.

Link to comment
Share on other sites

That code is from the MS3 create account page - and the MS3 create account page is not yet complete.  There are whole chunks of code misssing from it.

 

Vger

 

I am using

 

$Id: create_account.php,v 1.65 2003/06/09 23:03:54 hpdl Exp $

 

I am trying to find where the code is that the error refers too so I can change it

 

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

 

What or where is the 'field list' or am I on the wrong track?

Link to comment
Share on other sites

It comes from the list of fields in the 'customers' table in the osCommerce database.

 

I recommend doing two things:

1. Restore the create_account.php page if oyu have been editing it.

2. Check in your database, via phpMyAdmin, to make sure that all of the fields are there.

 

Vger

Link to comment
Share on other sites

It comes from the list of fields in the 'customers' table in the osCommerce database.

 

I recommend doing two things:

1.  Restore the create_account.php page if oyu have been editing it.

2.  Check in your database, via phpMyAdmin, to make sure that all of the fields are there.

 

Vger

 

I have restored the fields

 

customers_firstname

customers_lastname

 

And this fixes the problem but the fields are not used and I would prefer if they were not there.

 

Something somewhere is looking for the fields and I was hoping to edit it out, what is this info being used for? Maybe I could change it to look at

 

customers_username

 

Russell

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...