mark w Posted May 14, 2003 Posted May 14, 2003 for instance, above the categories list it now says, "BOX_HEADING_CATEGORIES", above the what's new box, says the same thing but for _WHATS_NEW. This is one of my problems. I just installed the Customer Specific Discount and followed the instructions, minus the line that says "* You need to add one field to the customers table. Here is the SQL statement that would accomplish this : ALTER TABLE customers ADD customer_discount DECIMAL(5,2) DEFAULT '0' NOT NULL;" I'm not sure how to do this exactly, maybe someone can point me in the right direction on how to edit the MySQL DB. Also, I updated to the admin members discount that lets you edit each member's discount from the admin page instead of going into the Database. So everything shows up now but when I go to edit my dummy member, John Doe, I get this message: --------------------------------------------------------- 1054 - Unknown column 'c.member_flag' in 'field list' select c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.member_flag, c.customers_default_address_id from customers c left join address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '1' [TEP STOP] ------------------------------------------------------------------- Any help would be appreciated. -mark Quote
Guest Posted May 15, 2003 Posted May 15, 2003 the error is caused because you do have a field in the db called "member_flag" That line you memtioned adds it There are a number of programs ou there that will let you add the feild to the DB one of them is phpmyadmin at http://phpmyadmin.net Many web host install this for you. From within phpmyadmin is an area that allows you to run sql, copy and paste the line and it should add it. Quote
mark w Posted May 22, 2003 Author Posted May 22, 2003 thank you zip. I followed your advice and used the query line given in the text file in the phpMyAdmin that our webserver provides. It said it was successful. But I still get the same exact message when I tried to edit an account I created under my name. Although I'm positive I followed the php editing directions given in both packages, I suppose I could go over them again, but i'm about 99% sure I did them right, since this was about the 3rd time I've done them to a fresh osCommerce install. So do you have any new suggestions about this error? thanks. -mark Quote
loxly Posted May 22, 2003 Posted May 22, 2003 That error means exactly what it says, the database doesn't have the field installed in it, so check it again :) Go the the customer table and see if the field is there. It isn't. Quote [no external urls in signatures please, kthanks]
mark w Posted May 22, 2003 Author Posted May 22, 2003 ok, loxly I went to the list and yes the c.member_flag is not there. So my question now is how do I add it to the field list? -mark Quote
loxly Posted May 22, 2003 Posted May 22, 2003 ALTER TABLE customers ADD customer_discount DECIMAL(5,2) DEFAULT '0' NOT NULL Go to your database and paste that line into your sql query editor and hit enter. Quote [no external urls in signatures please, kthanks]
mark w Posted May 22, 2003 Author Posted May 22, 2003 loxly, did it again, but I had to delete the customer_discount field that already existed because it game me this error Error SQL-query : ALTER TABLE customers ADD customer_discount DECIMAL( 5, 2 ) DEFAULT '0' NOT NULL MySQL said: Duplicate column name 'customer_discount' so after I dropped that field, I pasted your query request and it said executed successfully, went to the oscommerce cart-> customers->my account-> edit and got the same error: 1054 - Unknown column 'c.member_flag' in 'field list' select c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.member_flag, c.customers_default_address_id from customers c left join address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '2' -mark Quote
loxly Posted May 23, 2003 Posted May 23, 2003 It sounds like you have 2 databases. that is the only explanation I have for you. You said you looked and it wasn't there, and then you did the insert and it was there. Ask your host what is going on, this isn't a problem we can resolve for you. Quote [no external urls in signatures please, kthanks]
S-DM Posted May 23, 2003 Posted May 23, 2003 Hi, Loxly, Pls, provide me the SQL command to add the member_flag filed in the table. It is not exists by default. and nothing about it in the modules instalation instruction Or, if I am mistaken, just tell me at what the module installation step this field should will appear Thanks Quote
bren Posted August 22, 2003 Posted August 22, 2003 Anyone help with this? I have the same problem! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.