[ic] Strange behavior with [value-extended] tag

Kevin Walsh kevin at cursor.biz
Wed Aug 16 12:48:31 EDT 2006


Marty Tennison <marty at sediva.com> wrote:
> ActionMap  best-sellers  <<EOR
> sub {
> 	$CGI->{mv_todo} = 'search';
> 	$CGI->{mv_searchtype} = 'db';
> 	$CGI->{mv_nextpage} = 'results';
> 	$CGI->{mv_max_matches} = '99';
> 	$CGI->{mv_matchlimit} = '8';
> 	$CGI->{mv_coordinate} = 1;
> 	$CGI->{mv_sort_field} = 'sales_rank';
> 	$CGI->{mv_sort_option} = 'n';
> 	$CGI->{mv_search_file} = 'products';
> 	$CGI->{mv_search_field}[0] = 'sales_rank';
> 	$CGI->{mv_searchspec}[0] = '0';
> 	$CGI->{mv_column_op}[0] = '>';
> 	$CGI->{mv_numeric}[0] = '1';
> 	$CGI->{mv_search_field}[1] = 'inactive';
> 	$CGI->{mv_searchspec}[1] = '1';
> 	$CGI->{mv_column_op}[1] = '!=';
> 	$CGI->{mv_numeric}[1] = '1';
> 	$Tag->update('process');
> 	return 1;
> }
> EOR
> 
Your variable stacking is incorrect.  Try this instead:

ActionMap best-sellers <<EOA
sub {
    $CGI->{mv_todo} = 'search';
    $CGI->{mv_searchtype} = 'db';
    $CGI->{mv_nextpage} = 'results';
    $CGI->{mv_max_matches} = '99';
    $CGI->{mv_matchlimit} = '8';
    $CGI->{mv_coordinate} = 1;
    $CGI->{mv_sort_field} = 'sales_rank';
    $CGI->{mv_sort_option} = 'n';
    $CGI->{mv_search_file} = 'products';
    $CGI->{mv_search_field} = "sales_rank\0inactive";
    $CGI->{mv_searchspec} = "0\01";
    $CGI->{mv_column_op} = ">\0!=";
    $CGI->{mv_numeric} = "1\01";
    $Tag->update('process');
    return 1;
}
EOA

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/


More information about the interchange-users mailing list