Guest Posted July 30, 2005 Share Posted July 30, 2005 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 More sharing options...
Guest Posted July 30, 2005 Share Posted July 30, 2005 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 More sharing options...
Guest Posted July 30, 2005 Share Posted July 30, 2005 well with this, dont know what else to say other than replace the code with original <{POST_SNAPBACK}> 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 More sharing options...
♥Vger Posted July 30, 2005 Share Posted July 30, 2005 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 Link to comment Share on other sites More sharing options...
Guest Posted July 30, 2005 Share Posted July 30, 2005 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 <{POST_SNAPBACK}> 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 More sharing options...
♥Vger Posted July 30, 2005 Share Posted July 30, 2005 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 More sharing options...
Guest Posted July 30, 2005 Share Posted July 30, 2005 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 <{POST_SNAPBACK}> 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 More sharing options...
♥Vger Posted July 30, 2005 Share Posted July 30, 2005 There are multiple references to those fields in a large number of files. If you want to try and edit them out that's fine - but you're on your own! Vger Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.