[ic] loosing a [value ] <- Partially solved, need more help

Bill Randle billr@exgate.tek.com
Tue, 17 Apr 2001 12:29:16 -0700

Rene Hertell wrote:
> I found out a way in getting the active value...
> [perl]$CGI->{group}[/perl]
> But, how do I get a value pulled out from a db, like:
> [data table=cat field=category key='[value group]']" hide=1]
> How do it make the above query in Perl?

Two answers: the easy one and the answer to the question you asked. The
easy one is use this:
	[data table=cat field=category key="[cgi group]"]

instead of [value group]. (Did I do that? If so, that was a bug and you
should ding me for it.) To check for values in the current form in a mv_click
block (which is what you have), you have to use [cgi name] or $CGI->{name}
instead of [value name] or $Values->{name} as the copy from $CGI to $Values
doesn't happen until *after* the mv_click processing.

TO answer the question you actually asked:

	my $group = tag_data('cat', 'category', $CGI->{group});
	my $group = tag_data({table='cat', field='category', key='[cgi group]'});

Be sure to include tables="cat" on the [perl] tag. E.g.:
	[perl tables="cat"]
	    # stuff