Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2008
    Posts
    33
    Plugin Contributions
    0

    Default Adding field to customers table

    I'd like to add a simple timestamp column to the end of the customers table. I know *how* to do it, but just thought I'd check and see if anyone know a reason *not* to do it. I don't want to break anything that would depend on there being a certain number of columns or something silly like that.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Adding field to customers table

    Why?

    What's this "timestamp" for?

    There's already a last_modified column which is a timestamp indicating the last change.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2008
    Posts
    33
    Plugin Contributions
    0

    Default Re: Adding field to customers table

    The field would be for when the record was created (aka when the account was created). In one case, I wanted to use an external newsletter mailing and wanted to pull customers who created accounts and opted-in since the previous mailing. In another case, I just wondered how many accounts were created this month or that month.

    So would that break anything?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Adding field to customers table

    It's a waste of your time. Why make the database schema more complicated and more to maintain needlessly?

    There's already a date-created and last-modified date stored for each customer record: just do a join on customers and customers_info and you'll have all that information.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2008
    Posts
    33
    Plugin Contributions
    0

    Default Re: Adding field to customers table

    Quote Originally Posted by DrByte View Post
    It's a waste of your time. Why make the database schema more complicated and more to maintain needlessly?

    There's already a date-created and last-modified date stored for each customer record: just do a join on customers and customers_info and you'll have all that information.
    "That data is already being captured in customers_info" is what I needed to hear. thanx.

 

 

Similar Threads

  1. v151 Adding a Custom field to the products table
    By jimmie in forum General Questions
    Replies: 4
    Last Post: 17 Sep 2013, 11:14 PM
  2. Adding Custom Field to Customer Table
    By experimenter in forum General Questions
    Replies: 3
    Last Post: 26 Sep 2008, 08:36 PM
  3. Adding field to categories_description table
    By 0101101011 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 13 Aug 2007, 05:56 PM
  4. Adding field to products_description table
    By IncrediBody in forum General Questions
    Replies: 2
    Last Post: 14 Sep 2006, 05:18 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