If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / [Not a bug] Database column named incorrectly?

[Not a bug] Database column named incorrectly?

Started by simon1066 on 23 Oct 2012, 9:41 AM · Views: 602

Results 1 to 2 of 2
23 Oct 2012, 9:41 AM
#1
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Post #1 by simon1066

Looking in the database to get get a handle on how Zen Cart uses the product attribute information, it struck me that

in table 'products_attributes' the column

'products_options_sort_order'
should be
'products_options_values_sort_order'

as is the case in table 'products_options_values'

There may be a good reason for this, but it caused me a lot of confusion (not difficult!) until I realised what this column actually contained.

Simon

23 Oct 2012, 1:36 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

Good eye.

but ...

Not a bug.

While the name is less descriptive than what it could be, it is used consistently throughout the code, which means it functions correctly, so it's not technically a bug.

The name was inherited from oscommerce in 2003.
Indeed they could have chosen a name which more accurately reflects that field's purpose.

Strictly speaking, it could have been called "fred" and still work as long as it was called "fred" everywhere in the PHP code which uses it.

.
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.