[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] sql query results problem
Hallo,
the code I use is down the page. The problem I have is when there is no row
in the table menge, meaning the query should be empty there is nothing
displayed. I thought [no_match] would work but it doesnt. I use IC 4.8.3.
If there is a row returned (this means data is entered for a user - sku
combination) it works. Am I doing sth wrong ?
What do I need to do to get it working if sql query is empty - no data in
the table fpr the user, sku combination ?
[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> [sql-param
quantity]</b></font>
[else]
<font color=red>No</font>
[/else]
[/if]
[/on_match]
[no_match]
<font color=red>No</font>
[/no_match]
[/query]
Thank you
Andrei