Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1054 - Unknown column 'plain_email' in 'field list


SunnyKid

Recommended Posts

Posted

Hi.

I'm trying to add an option for customers to select if they want HTML or PLAIN TEXT emails.

 

I have added a field in the 'customers_info' table which is of type enum('y','n') with a default value of 'n'.

I did this as i realise there is no boolean type in mysql.

 

i have now modded create_account.php to accomodate the value which is passed from the form submission;

 

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, plain_email) values ('" . (int)$customer_id . "', '0', now(), '" . $plain_email . "')");

 

i have assigned the string prior to this line and the value DOES propagate to it from the form.

 

however, i get the following error;

 

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

 

insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, plain_email) values ('24', '0', now(), 'y')

 

when i copy paste this line into phpMyAdmin, surely enough, it DOES create the record.

Why is PHP spewing up this error when the sql query seems intact?

any suggestions?

 

 

 

Here's something I found on the oscommerce forums;

http://www.oscommerce.com/forums/index.php?sho...=0entry265911

 

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

 

 

Naming scheme?? eh?? this may be my problem but I don't get it!

:blink:

Archived

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

×
×
  • Create New...