Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Why is products_description.products_id an auto-increment field?

    Given that the products_description table's products_id field is always updated directly with the products_id value from the associated products table, why is the products_description.products_id field tagged with an auto-increment attribute in the database?

    No issues here, just trying to learn/understand.

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

    Default Re: Why is products_description.products_id an auto-increment field?

    I've always wondered the same.

    And, I thought we'd addressed that awhile back ... but evidently we haven't. Not even in the v160 code. Argh.


    Maybe we can convince wilt to allow that change for v155 ;)
    .

    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
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Why is products_description.products_id an auto-increment field?

    There is absolutely no reason it needs to be auto_increment.

    I took a look at a v1.0 zip and it's set as auto_increment there, so this is something that has not just crept into code !!!

    As far as I know there are no potential bad side effects from having it set thus, apart from some side cases related to innodb.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Re: Why is products_description.products_id an auto-increment field?

    Thanks for the updates and answers! I guess that this underscores that it's OK to ask questions.

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

    Default Re: Why is products_description.products_id an auto-increment field?

    The change will be included in v155.
    .

    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.

 

 

Similar Threads

  1. v154 products_options, products_options_values: Indexes aren't auto-increment?
    By lat9 in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 23 Oct 2015, 08:28 PM
  2. Custom database auto increment
    By hubert in forum General Questions
    Replies: 3
    Last Post: 14 May 2015, 01:46 AM
  3. Auto Increment Product Model Numbers?
    By jaqdaw in forum General Questions
    Replies: 0
    Last Post: 8 Feb 2011, 06:06 PM
  4. 1062 Duplicate entry after db install is it auto-increment settings?
    By BrookieWookie in forum Upgrading from 1.3.x to 1.3.9
    Replies: 6
    Last Post: 24 Feb 2008, 02:30 PM
  5. Add field to products_description table
    By pjb923 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 1 Apr 2007, 07:38 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR