R: using IMPORT
"Luca Notari" <[email protected]> Mon, 16 Oct 2006 14:37:16 +0200
| Newsgroups | gmane.comp.apache.mod-survey.general |
|---|---|
| Message-ID | <000001c6f11f$d05cca20$6501a8c0@evo01> |
Yes, that's what i need. The point was confirmed, possibility to use SQL syntax in tags value. Many thanks, Luca Notari -----Messaggio originale----- Da: [email protected] [mailto:[email protected]] Per conto di Joel Palmius Inviato: lunedì 16 ottobre 2006 13.52 A: [email protected] Oggetto: Re: survey-discussion-list: using IMPORT Hrm, I'm not exactly sure I understand what you want to do, but perhaps something like this? <SURVEY TITLE="import"> <IMPORT DBIDSN="DBI:Pg:dbname=joepal" DBITABLE="armorbrand" DBIUSER="joepal"> <VARIABLE NAME="arm" FIELD="count(*) as armors" /> <FILTER CRITERIA="NOT name ISNULL" />: </IMPORT> <TEXT NAME="armor" CAPTION="Add new brand (there are currently {$arm$} brands in DB)" /> </SURVEY> Idea is to import a count() as a variable and then use it with {$..$} in output. Bugant probably has a better way to do this, I never worked much with the IMPORT tag. // Joel On Fri, 13 Oct 2006, Luca Notari wrote: > Hi all, > > I'm using for a survey DBI instruction for saving data in a database. > I have a question about IMPORT tag and his sub-tags. > > this is what I have to do (is possible using an SQL statement): > > I have to ask a question, that requires checking back a sum of > responses > (quota) by precedent respondents. > > a question possible is: "do you have a dog? So far, we've collected XX > dog(s)". > > with a SQL statement such "select count(the_dog_column) from > people_table where the_dog_column='yes'" i can fetch data that i need. > > Shortly, I have to retrieve this data but I don't want to populate a > list. > > do subtags as filter, variable supports retrieving a sum of records > matching a criteria from a database? > > regards, > > Luca Notari > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.408 / Virus Database: 268.13.3/473 - Release Date: > 12/10/2006 > > Skickat av Joel Palmius <[email protected]> till survey-discussion -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.408 / Virus Database: 268.13.3/473 - Release Date: 12/10/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.408 / Virus Database: 268.13.3/473 - Release Date: 12/10/2006 Skickat av "Luca Notari" <[email protected]> till survey-discussion