Forum OpenACS Q&A: Re: How to retrieve data using quries written in Xql with TCL and ADP

  I am new at this, but I tried something like this and it didnt work, the first error i noticed was that multiple should be multirow in the tcl file. I also had problems with the naming of the query in my xql file. How does this work? e.g. I have noticed that in the default /web/{service}/www/index.xql file the queries are named dbqd.www.index.user_name_select etc. when i put a new query in this file it wasnt found. What is the naming convention for queries? Is there a document I should have read to find this out?


David Bell

Oh, and regarding your multiple problem: the error message sounds quite self-explanatory. If you want to present multiple rows of information, you have to have multiple rows of data. You achieve that by using db_multirow database proc in your tcl file (or just multirow, if you're not retrieving data from db). Please see the link to documentation in my previous post.