[ic] Wierd behaviour mysql query - URGENT

Andrei Gologan interchange-users@icdevgroup.org
Wed Oct 16 08:34:00 2002


Hallo,

we have following code that worked  until a few days:

[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]
[if type=explicit compare="[calc][sql-param quantity] > 0 [/calc]"]
 <font __FFACE__ size="1" color="#008000"><b> [sql-param
quantity]</b></font>
 [else]
<font color=red>No</font>
[/else]
[/if]
[/on_match]

[no_match]
<font color=red>No</font>
[/no_match]

 [list]
 [/list]
[/query]
[else]
..............
[/else]

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] ....................

so only if there is a [query] outside the [if-data-item .....]

I dont get it, why ... but it has to work again, fast !!!

Thank you for any help !!

Andrei