Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2012
    Posts
    151
    Plugin Contributions
    0

    Default should I add new table to store new field?

    should I add new table to store new field in zencart db?

    zencart original table
    table : customers
    customers_id | ...
    1 | ...
    2 | ...

    now I need to add a new field for customer
    I create a new table
    table : customers_extra
    customers_id | is_blogger
    1 | 0
    2 | 1

    or directly created in the customers table
    table: customers
    customers_id | ... | is_blogger
    1 | ... | 0
    2 | ... | 1

    which method should I use ? will add new table be worth to do ? will it slow down the query speed?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: should I add new table to store new field in zencart db?

    What information are you going to store in this??
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Apr 2012
    Posts
    151
    Plugin Contributions
    0

    Default Re: should I add new table to store new field in zencart db?

    is_blogger means that if the customers is a fashion blogger or not.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: should I add new table to store new field in zencart db?

    Quote Originally Posted by linjuming View Post
    is_blogger means that if the customers is a fashion blogger or not.
    And once the field is created, how are you going to load data to it and how are you going to use the data?

    It's all very well having the field (that's the easy part)... How you get data into the field and how you use that data is what's complicated.

    And is this data really necessary for the effective functioning of the store?
    20 years a Zencart User

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: should I add new table to store new field in zencart db?

    You might be able to use the customer discount groups feature to store this info. (I am not sure if this would interfere with other uses of discount groups.) Create a "Blogger" discount group and add the appropriate customers to it. You don't have to actually discount anything here. You can then retrieve the info and use it wherever you want.

 

 

Similar Threads

  1. v150 Help with addon MSRP: Add a new field to the products table
    By Johnnycopilot in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 5 Jan 2014, 11:28 PM
  2. weight in Kgs should be Lbs in new store
    By Makoshark in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 24 Apr 2010, 12:15 AM
  3. Add new field to product table?
    By ckad79 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 19 May 2009, 11:24 PM
  4. Should I create new zones table as zen_zones
    By nnitin in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 28 Oct 2008, 07:33 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR