[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[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.
>
> thnak you for any help !!!
>
> [if-item-data products limitiert eq 1]
> [query type=list list=1 sql="SELECT quantity FROM menge WHERE
> username='[data session username]' AND sku='[item-code]'"]
> [on_match]
> [if type=explicit compare="[calc][sql-param
> quantity] > 0 [/calc]"]
> <font __FFACE__ size="1"
> color="#008000"><b>aa [sql-param quantity]</b></font>
> [else]
> <font color=red>Nein</font>
> [/else]
> [/if]
> [/on_match]
>
> [no_match]
> <font color=red>Nein</font>
> [/no_match]
>
> [list]
> [/list]
> [/query]
>
> [else]
> [item-calc]
> my $q = q{[item-data inventory quantity]};
> if($q > 0) {
> return <<EOF;
> <font __FFACE__ size="1" color="#008000"><b>[item-data inventory
> quantity]</b></font>
> EOF
> }
> else {
> return <<EOF;
> <font color=red>Nein</font>
> EOF
> }
>
> [/item-calc]
> [/else]
> [/if-item-data]
>
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
"Even if you're on the right track, you'll get run over if you just
sit there." -- Will Rogers