Akopia Akopia Services

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

Re: [mv] Using Scratch Variable as Pointer



******    message to minivend-users from Mike Heins <mikeh@minivend.com>     ******

Quoting Eric Paul (epaul@spellbook.net):
> 
> Is there any good reason that you can't use a scratch variable as a pointer 
> into a database?  I'm trying to parse this code under Minivend 4.04a and it 
> is returning nothing.  Assume that all the proper entries do exist in the 
> database.
> 
> [seti product_category][data
>                                  table=master
>                                  col=category
>                                  key=`
>                                          $tmp = q{[my-code]};
>                                          $tmp
>                                  `]
> [/seti]
> 
> [data
>                  table=cat
>                  col=banner_text
>                  key=`
>                          $tmp = q{[scratch product_category]};
>                          $tmp =~ s/[ ,].*//;
>                          $tmp
>                  `]</B></FONT></TD>

I don't understand this -- you are trying to Mix MV tags with the
perl in the key parameter, and to no effect. While you could do 
"[calc] ... [/calc]", there is no point in trying to do things this way.

                  key=`
                          $tmp = $Scratch->{product_category};
                          $tmp =~ s/[ ,].*//;
                          $tmp
                  `

is correct.

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.8220 fax 7501 <heins@akopia.com>

Fast, reliable, cheap.  Pick two and we'll talk.  -- unknown
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: