[ic] releasing stored scratch variable and other Tag->query() question

Andrew C. interchange-users@icdevgroup.org
Thu Apr 24 14:37:00 2003




24 April 2003

Hello again icdev user group.

I have two quick questions:

1.  On my product detail page I check for the existance of certain child
records in a table called product_notes that describe the product in
products and display the "title" of these children records on the
product detail/flypage as hyperlinks to the actually information.
However these product_notes can be huge (up to .5 MB) and numerous (up
to 20 per product).  I don't want to store ALL of these product_notes as
separate scratches because they could take up a lot of memory - I may be
wrong on this.  So how do I keep the "pointer" to the product_notes
record, so when the hyperlink is clicked I do not have to pull the data
from the product_note table all over again.  I know the field I am
searching on is the key and is indexed, but it seems a waste to find the
record twice.

If I set a variable, scratch or value, to the product_notes.[note_text]
field and it is a large value I will want to clear it immediately.  Will
just setting the variable to an empty string do it like [set
prod_note_text][/set] if the scratch var prod_note_text contained the
data in it.

2.  I use the $Tag->query() tag in a perl block.  After I return the
array reference I am using is there any "cleanup" I should do before I
close the perl block with [/perl] as I might do when using DBI?

Thank you.

---
Andrew