[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] sql query ...
Quoting Andrei Gologan (agologan@gmx.mis.de):
>
> ----- Original Message -----
> From: "Mike Heins" <mike@perusion.com>
> To: <interchange-users@icdevgroup.org>
> Sent: Tuesday, November 26, 2002 2:16 PM
> Subject: Re: [ic] sql query ...
>
>
> > Quoting Andrei Gologan (agologan@gmx.mis.de):
> > > sql query problem, I am dying on this !!!!!
> > >
> > > i have this code, it works on flypage and it does not work on
> results.html
> > > !! The problem is when there is no data entered in the table menge, that
> > > means the query returns empty. Why does it work on one page and not on
> the
> > > other ??????
> > > there are 2 different types of items with 2 inventory tables.
> >
> > Looks like you may have reached the ITL complexity limit. 8-)
> >
> > Suggest you instead put it all into one [item-calc] -- the [if explcit]
> > combined with the [item-calc] will undoubtedly kill performance on the
> > results page anyway.
> >
>
> I dont know, it works just fine, EXCEPT when there is no valid row in the
> extra table, Ok i could go and allways insert for the special items a row
> for each user, it is not very elegant but it would work.
> I will look into item-calc, I dont know how to do that yet.
>
> The only visible problem on the outside is on the results page, if such an
> item is encountered and no output is generated, this means i cannot output
> an mv_order_quantity so the text input fields for the quantities get shifted
> by 1, so all bellow the special item have the wrong code , if i try to order
> , it will put in cart the item above.
>
> I think the sql query should go into no_match if there are no data returned
> , instead it seems that it does not know this answer .. am i right ?
>
Your problem is not that -- it is that the containing [item-list] is
seeing the [no-match] section as its own.
Try doing:
[query prefix=sql list=1 sql="select * from ..."]
[sql-list]
[sql-code] -- [sql-price]
[/sql-list]
[sql-no-match]
foo
[/sql-no-match]
[/query]
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
People who want to share their religious views with you
almost never want you to share yours with them. -- Dave Barry