[ic] Using Scratch Variable as Pointer
Eric Paul
epaul@spellbook.net
Wed, 06 Sep 2000 12:57:24 -0400
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 can display the contents of [scratch product_category] and get the proper
category field. I then try to do the lookup in the cat database to get the
proper text, but it always returns nothing. Am I doing something wrong, or
can you just not use scratch variable in this manner?
Eric
---
Eric Paul
SpellBook Systems
http://www.spellbook.net