[ic] query in a query list
Ton Verhagen
interchange-users@icdevgroup.org
Sun May 18 17:07:00 2003
Quoting Xavier GILLET :
>Hi,
>
>I have a problem with this code.
>First query return a list and for each line I can reload the page to have a
>second list of results with the second query.
>
>The problem is the second query return nothing...
>
>Thanks for help.
>
>Xavier (Mister X) - France
>
>
>[query
>prefix=sql
>type=list
>ml=1000
>sql="select envoye_a_username, code, statut, debut_conversation,
>fin_conversation from messages where
> envoye_par_username = '[data session username]'
> and
> message_type = 'Début'
> order by debut_conversation desc"
>]
>[sql-list]
>
><a href="[area form='
> voir_[sql-param code]=1
> mv_todo=return
> mv_nextpage=@@MV_PAGE@@']"><b>Détails</b></a>.
>[if cgi voir_[sql-param code]]
>[perl]$CGI->{voir_[sql-param code]}='';[/perl]
>
> [tmp conversation][sql-param code][/tmp]
> [query
> type=list
> ml=1000
prefix=inner
> sql="select texte_message from messages where
> ref_conversation = 'C[scratch conversation]'
> and
> message_type = 'Conversation'
> order by date_message asc"
> ]
> [list]
[inner-list]
> [sql-increment] : [sql-param texte_message]<br>
[inner-increment] : [inner-param texte_message]
> [/list]
[/inner-list]
> [/query]
>
>[/sql-list]
>[/query]
Xavier, have a look at my posting of may 6th regarding
your question about loop/query combination.
Use a prefix=yourprefix (eg. inner) in the inner query.
Best regards,
Ton
--
Alamerce Nederland --- Cornerstone of eBusiness
Phone +31-40-2374381 info@alamerce.nl http://www.alamerce.nl
eCommerce Solutions -- Consulting -- Website & Interchange Hosting