[ic] Not able to retrieve fields from custom table

Paul Jordan paul at gishnetwork.com
Thu May 13 12:18:46 EDT 2004


Tim Good [tim.g at edsd.com] wrote:
>> Tim, it seems like your saying that [sql-param charge] is not coming
>> through for you. Your email does not show the [query] that is making
>> [sql-param charge] availiable. Please include that. Maybe you forgot
>> to include "charge" in the select statement.
>>
>> Also, it may be easier, and cleaner to do somehting like:
>>
>> 		$Scratch->{charge_1} = 0;
>> 		$Scratch->{charge_2} = 0;
>> 		$Scratch->{charge_3} = 0;
>>
>>       $tmp = 0;
>>        # If subtotal value exists, format it for totaling.
>>        if ($subtotal && !($subtotal =~ /^\$/)) {
>>           $tmp += $subtotal;
>> 		$Scratch->{charge_1} = $tmp;
>>        }
>>        elsif ($subtotal && ($subtotal =~ /^\$/)) {
>>           $tmp += substr($subtotal, 1, length($subtotal)-1);
>> 		$Scratch->{charge_1} = $tmp;
>>        }
>>
>>
>>        # If install value exists, format it for totaling.
>>        if ($install && !($install =~ /^\$/)) {
>>           $tmp += $install;
>> 		$Scratch->{charge_2} = $tmp;
>>        }
>>        elsif ($install && ($install =~ /^\$/)) {
>>           $tmp += substr($install, 1, length($install)-1);
>> 		$Scratch->{charge_2} = $tmp;
>>        }
>>
>> Then disperse [scratchd charge_N] accordingly. You would only have
>> to call your tag once.
>
> Paul,
>
> What I am saying, about [sql-param foo] and the [query] tag is this;
> it works great except that when no results are returned the area
> between [query ...] [no_match]*****BLANK****[/no_match] [/query] is
> blank. I have tried to use the [query ...] tag and within the body of


I did not see any [no-match] tags. At any rate, for them to work, you must use
[list][/list] inside your query.

http://www.icdevgroup.org/doc-5.0/frames/ictags_91.html

Paul






More information about the interchange-users mailing list