Forum OpenACS Q&A: Re: xql

Collapse
2: Re: xql (response to 1)
Posted by Nima Mazloumi on
Almost every package has sample xql files under package/www/...

like file-storage/www/file-copy.xql:

<?xml version="1.0"?>
<queryset>

<fullquery name="file_name">
      <querytext>

    select name as title
    from  cr_items
    where  item_id = :file_id

      </querytext>
</fullquery>

</queryset>

So the query file_name is called in the file file-copy.tcl by something like:

db_string file_name {}

or

db_0or1row file_name {}

That's all about xql.

Greetings,
Nima

Collapse
3: Re: xql (response to 2)
Posted by Pablo Contreras on
Thank you Nima, so I must to use tcl templates? another question. where are you from? Nice to meet you.