Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: users

Strange query problem - punches through if's

 

 

Interchange users RSS feed   Index | Next | Previous | View Threaded


lists at gmnet

Sep 24, 2009, 12:32 PM

Post #1 of 3 (673 views)
Permalink
Strange query problem - punches through if's

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?

Thanks
Rick





--
This message has been scanned for viruses and
dangerous content by Green Mountain Network, and is
believed to be clean.


_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


racke at linuxia

Sep 24, 2009, 12:41 PM

Post #2 of 3 (622 views)
Permalink
Re: Strange query problem - punches through if's [In reply to]

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


_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


carl at endpoint

Sep 24, 2009, 6:48 PM

Post #3 of 3 (618 views)
Permalink
Re: Strange query problem - punches through if's [In reply to]

On Sep 24, 2009, at 3:32 PM, Rick Bragg wrote:

> Hi,
>
> I have the following problem that:

Rick,
I can't explain your hanging [/query] tag, but I can suggest a way
around the problem ...

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

[tmp statement][if scratch test]select foo from bar where baz[/
tmp][else]select alpha from bravo where charlie[/else][/if][/tmp]
[query type=list label=test2 prefix=test2 list_prefix=test2_list
sql="[scratch statement]"]

> [test2_list]
>
> - [test2-param description]<br>
>
> [/test2_list]
> [/query]
>
> [/test_list]
> [/query]



Regards,
Carl
. . . . . . . . . . . . . . . . . .
Carl Bailey
End Point Corp.
t: 919-323-8025
. . . . . . . . . . . . . . . . . .




_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Interchange users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.