Results 1 to 3 of 3

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

This is a discussion on 1054 - Unknown column 'plain_email' in 'field list' within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; Hi. I'm trying to add an option for customers to select if they want HTML or PLAIN TEXT emails. I ...

      
  1. #1
    Anonymous
    Guest


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

    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?

  2. #2
    New Member
    Join Date
    Dec 2003
    Posts
    6
    Rep Power
    0


    Default

    Here's something I found on the oscommerce forums;
    http://forums.oscommerce.com/index.p...p;#entry265911

    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!

  3. #3
    Anonymous
    Guest


    Default

    What the error means, is that there is no column named 'plain_email' in whatever table is represented in the constant TABLE_CUSTOMERS_INFO.

    You have either not created the column in MySQL or you have created it, but you spelled it incorrectly/differently (That's the problem that I had)

    I hope this helps. If you have any more problems, please e-mail me. I am not registered for this forum and will not receive any e-mail notifications.

    You can reach me at sirblack@canada.com

Similar Threads

  1. 1054 - Unknown column 'a.authors_id' in 'on clause'
    By fuzzyphil in forum osCmax v2 Customization/Mods
    Replies: 29
    Last Post: 01-08-2009, 05:05 PM
  2. Error: 1054 - Unknown column
    By islander in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 02-27-2006, 12:31 PM
  3. 1054 - Unknown column 'p.vendors_product_price'
    By RoyceK in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 02-12-2006, 09:22 PM
  4. Unknown column 'products_options_value_text' in 'field list'
    By jptechnical in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 08-09-2004, 10:22 AM
  5. 1054 - Unknown column - Help, please !
    By Anonymous in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 11-27-2002, 12:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •