Re: how to link different but related tables
From: The Natural Philosopher <tnp_at_invalid.invalid>
Date: Sun, 20 Mar 2016 21:18:20 +0000
Message-ID: <ncn42o$jr9$1_at_news.albasani.net>
>>> Or (without eval), putting all different actions in a big switch/case:
>>> >
>>> >switch($product_type) {
>>> >case 'dematerialized':
>>> > // Actions to build html code related to dematerialized product
>>> > break;
>>> >case 'physical':
>>> > // Idem for physical items
>>> > break;
>>> >...
>>> >}
>>> >
Date: Sun, 20 Mar 2016 21:18:20 +0000
Message-ID: <ncn42o$jr9$1_at_news.albasani.net>
On 20/03/16 21:14, mireero wrote:
> On 03/13/2016 03:11 PM, Jerry Stuckle wrote:
>>> Or (without eval), putting all different actions in a big switch/case:
>>> >
>>> >switch($product_type) {
>>> >case 'dematerialized':
>>> > // Actions to build html code related to dematerialized product
>>> > break;
>>> >case 'physical':
>>> > // Idem for physical items
>>> > break;
>>> >...
>>> >}
>>> >
>> Terrible. Code should never depend on database design. >> > > Thanks everyone for hints/info. > > I still have one question, I don't really understand the above comment. >
-- How fortunate for governments that the people they administer don't think. Adolf HitlerReceived on Sun Mar 20 2016 - 22:18:20 CET