[ic] Wierd behaviour mysql query - URGENT

Jonathan Clark interchange-users@icdevgroup.org
Wed Oct 16 09:59:01 2002


> > >
> > > now it will only work if it looks like that:
> > >
> > > [query list=1 sql="SELECT Id, quantity FROM menge WHERE
> username='[data
> > > session username]' AND sku='[item-code]'"]
> > > [if-item-data products limitiert eq 1]
> > > [query list=1 sql="SELECT Id, quantity FROM menge WHERE
> username='[data
> > > session username]' AND sku='[item-code]'"]
> > > [on_match] ....................
> >
> > and it only works if there are both queries there ... only one
> of them, no
> > matter which , and it stops working ....
> >
>
>
> ok some more bebug info:
>
> the error.log file says:
>
> [16/October/2002:15:21:15 +0200] dwshop
> /cgi-bin/shop/V200452222.html Safe:
> Can't locate object method "param" via package "quantity" at
> (eval 533) line
> 1.
> >
> > [sql-param quantity] > 0
>
> i am not so gut at this but it looks as IC thinks it is some other type of
> value or so ...

Shouldn't your [sql-param quantity] be inside your [list]? Maybe you see the
problem because you have it outside at the moment. You can avoid looping
within the [list] by adding 'LIMIT 1' to the end of your SQL code.

Jonathan
Webmaint.