[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Update on CommonAdjust Usertag GDBM errors -- Still needhelp, PLEASE!
mike@perusion.com wrote:
>Quoting Barry Treahy, Jr. (Treahy@MMaz.com):
>
>
>>Barry Treahy, Jr. wrote:
>>
>>
>>
>>>Kevin Walsh wrote:
>>>
>>>
>>>
>>>>>#
>>>>># Original
>>>>># my ($results,$colname_hashref,$colname_arrayref) = $Tag->query({
>>>>>wantarray =>1,sql => $sql, } );
>>>>># still use simplied version as easier on eyes, still works, and
>>>>>didn't stop the errors...
>>>>>my $results = $Tag->query({ wantarray => 1,sql => $sql } );
>>>>># This variation worked but produced the same error, different module
>>>>># my $db = ::database_exists_ref('tiers') or die 'Missing tiers table';
>>>>># my $results = $db->query({sql => $sql});
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>I use ::database_exists_ref($tablename), followed by $db->query($somesql)
>>>>all the time in my tags, but never use GDBM tables.
>>>>
>>>>I think you should break down your tag into bite-sized chunks and
>>>>test them separately. For instance, test the $db->query() in a
>>>>test tag of its own, then test the other parts and finally put it
>>>>all together.
>>>>
>>>>
>>>>
>>>>
>>I've taken the suggestion and reduced the tag down to:
>>
>>UserTag tier_pricing_test Order sku quantity
>>UserTag tier_pricing_test Routine <<EOR
>>sub
>>{
>> my $return;
>> $Tag->iclog("tier_pricing_test: Startup");
>>
>> my $sql = "select quantity,discount from tiers where tier='T2' order
>>by code desc";
>>
>> my $results = $Tag->query({ wantarray => 1,sql => $sql } );
>>
>> return 12345.67;
>>}
>>EOR
>>
>>but the basic results are the same:
>>
>>w2k.mmaz.com iaTMBiMb:mmaz.com - [06/September/2002:14:21:32 -0400]
>>mmb2c /cgi-bin/mmb2c/ATT-298F-06-SMA-02.html Safe: Can't locate object
>>method "query" via package "Vend::Table::GDBM" (perhaps you forgot to
>>load "Vend::Table::GDBM"?) at /
>>ibin/interchange/lib/Vend/Interpolate.pm line 5235.
>> >
>> > $Tag->tier_pricing_test( $item->{code}, $item->{quantity} )
>> >
>>
>>
>
>If it is a catalog UserTag, That will *absolutely* happen unless you
>have opened tiers prior to that usertag call. [perl tables=tiers][/perl]
>will do it, or [data table=tiers col=junk key=junk], even.
>
>
>
Thank you.
Barry
--
Barry Treahy, Jr * Midwest Microwave * Vice President & CIO
E-mail: Treahy@mmaz.com * Phone: 480/314-1320 * FAX: 480/661-7028