[ic] Strange query problem - punches through if's

Stefan Hornburg (Racke) racke at linuxia.de
Thu Sep 24 19:41:54 UTC 2009


Rick Bragg wrote:
> Hi,
> 
> I have the following problem that:
> 
> 
> [query
>     type=list
>     label=test
>     prefix=test
>     list_prefix=test_list
>     sql=|
> SELECT  code, title
> FROM products
> WHERE sku = '5'
> LIMIT 0,1
> |]
> [test_list]
>   [test-param description]<br>
> 
>   [tmp test]1[/tmp]
> 
>   [if scratch test] TEST!
>   [query
>     type=list
>     label=test2
>     prefix=test2
>     list_prefix=test2_list
>     sql=|
>   SELECT  code, title
>   FROM products
>   WHERE sku = '15'
>   |]
> 
>   [else]    TEST2!
>   [query
>     type=list
>     label=test2
>     prefix=test2
>     list_prefix=test2_list
>     sql=|
>   SELECT  code, title
>   FROM products
>   WHERE sku = '16'
>   |]
> 
>   [/else]
>   [/if]
>   [test2_list]
> 
>    - [test2-param description]<br>
> 
>   [/test2_list]
>   [/query]
> 
> [/test_list]
> [/query]
> 
> 
> It seems that the correct query is run, but I am left with a "[/query]"
> displayed in my page, and that somehow that second query does get called
> even inside the if!  I can verify this because if I comment out the
> test2 query (and keep the if's) its fine.  
> 
> Anybody know why?

The [/query] is outside [if] .... [/if]. This isn't allowed.

Regards
          Racke



-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team




More information about the interchange-users mailing list