MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] [perl] question



At 08:45 AM 11/22/99 -0500, you wrote:
>******    message to minivend-users from "Mr. Christopher F. Miller"
<cfm@maine.com>     ******
>
>On Mon, Nov 22, 1999 at 01:01:27AM -0700, Mike Gross wrote:
>> 
>> foreach $itemcode (@related_products) {
>>    my $productdescriptionhash=<<'EOF';
>>    [sql type=hash][arg]$itemcode[/arg]select description from products
>> where product_id = %s[/sql]
>> EOF
>
>Did you try:
> [sql type=hash]select description from products where product_id
='[item-code]'[/sql]

The problem is that [item-code] is the identifier for the product being
displayed on the flypage.  $itemcode is the identifier for a item listed in
the related_products field of the products database for the current
[itemcode].  I suppose I could have used a more descriptive name than
$itemcode, such as $relateditemcode.  I am trying to pull the description
field from the database for each $itemcode, not [item-code]


>The [item-code] is usually early enough in order of precedence.

Using it would make the code work, just not with the correct results.
Thanks anyway.



Search for: Match: Format: Sort by: