[ic] Need help with creating an array

Paul Jordan paul at gishnetwork.com
Wed Feb 11 17:11:56 EST 2004

Philip Alves [philip at backpackerpass.com] wrote:
> Hello all!
> What I need to do is put various values, scratch values
> and loop/sql code into one place, and then be able to
> get at it again.
> This is for a "memory" of various selected information
> based on dates.  So, if the user selects Feb 11, some
> information that is relevant to Feb 11 all gets remembered
> in one place and can be pulled up again later when it's
> needed.
> Are there any Interchange methods or examples out there
> for doing this?  I've searched the archives and read the
> docs, but with no luck.

The examples of this are too numerous to help you. You would have to give way
more detail, or explain the app fully, and ask for advice on how to go about
it. This may be more on topic for the .biz list.

It is not clear whether you want this memory to last page to page, in the
entire session, or a week later. Page to page would be more sutied for passing
cgi args, but would be more difficult to maintain in the longer term, entire
session "memory" would be more sutied towards scratch vars, but they would be
more likely to accidentally contaminate other site code, unless carefully
programmed. Of course, you can also database such things for longer term
storage. These have been listed in order of shortest to longest usability.

If, on the other hand, you talking about in-page memory, then you would be
looking for javascript to control widgets.

Anything that could be needed is already in foundation as an example.
"Components" and "Includes" can act as that parts that "place and can be pulled
up again later when it's needed". Said "Components" and "Includes" will can act
upon whatever cgi args, or scratch vars you pass to it.

DON'T be affraid to re-run a query. Storing the results of a query is *usually*
not the way to go. Properly optimized queries often have no real hit on the DB,
and that direction offers smaller sessions, and easier to maintain pages.


More information about the interchange-users mailing list