MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

SQL-query and if-then-else problems



******    message to minivend-users from "A. vd. Beemt" <antoine@medusa.nl>     ******


Hello,

Running Minivend 3.12 and Solid on FreeBSD I encountered a few odd problems:

Here's my query:

[sql type=list query="select x.code, x.logo_name, x.shopname,
x.description, x.domain from shop x, winkelcat y where y.wcat_id=[value
category] and y.code=x.code order by shopname" base=shop]

[if_sql_data SHOP winkelnaam]
blah blah
[else]
more blah
[/else]
[/if_sql_data]


[/sql]

As long as there is no if-then-else tag present, things go ok.
But as soon as I add the 'if-then-else', things go wrong. 

* It appears that on some shops the product-table (in this case shop)
should be in CAPITALS, and the field in undercast, while in some other
shops (running on the same server, but in a different shop and with a
different table) it is the other way around.... Where am I going wrong?

* If I try the query with either one or two tables, and an if-then-else,
the result is always 'more blah' where it should be 'blah blah'.
The funny part here is that I am absolutely certain that the field
'winkelnaam' is not empty! I can even read it's value within the sql-list....

What am I doing wrong? 
And are there maybe other ways to use 'if-then-else' in sql-queries?

Does somebody have a clue?

Thanks,
Antoine

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: