[ic] Example does not work for me
Stefan Hornburg
racke at linuxia.de
Thu Oct 16 16:29:24 EDT 2003
On Wed, 15 Oct 2003 00:23:40 +0200
"Juergen R. Plasser" <plasser at hexagon.at> wrote:
> This example from the tag reference does not work for me (ic4.9.8,
> mysql, redhat7.3):
>
> [query sql="select sku, description, price from products where
> price < 1000"
> type=list
> more=1
> ml=10]
>
> [on_match]Matched<br>[/on_match]
> [no_match]Not Found<br>[/no_match]
>
> [list]
> [sql-code] [sql-param description] [sql-price]
> [/list]
>
> [more_list]
> Matches [matches] of [match-count] shown.<BR>
> [more]
> [/more_list]
> [/query]
>
> the error.log reports:
> Runtime error: Undefined subroutine &Vend::Table::Shadow::errmsg called
> at /usr/lib/interchange/lib/Vend/Table/Shadow.pm line 436.
>
> What am I missing?
This patch for Shadow.pm should fix the problem:
--- Shadow.pm 15 Oct 2003 22:03:20 -0000 1.42
+++ Shadow.pm 16 Oct 2003 13:09:59 -0000 1.43
@@ -281,6 +281,11 @@
$opt = {};
}
$opt->{query} = $opt->{sql} || $text if ! $opt->{query};
+
+ if($opt->{type}) {
+ $opt->{$opt->{type}} = 1 unless defined $opt->{$opt->{type}};
+ }
+
$s = $s->import_db() unless defined $s->[$OBJ];
if ($opt->{query}) {
Ciao
Racke
--
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team
More information about the interchange-users
mailing list