cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Federica Legger <federica.leg...@cselt.it>
Subject multiple SQL queries
Date Wed, 06 Dec 2000 14:25:14 GMT
Hi everybody,
can I make multiple queries in one <sql:execute-query> statement?

I have this sample code:
<sql:execute-query>
   <sql:driver>org.gjt.mm.mysql.Driver</sql:driver>
   <sql:dburl>jdbc:mysql://localhost/mp3</sql:dburl> 
   <sql:doc-element>mp3</sql:doc-element>
   <sql:row-element>url</sql:row-element>
   <sql:query>
    select url from mp3 where 
    <request:get-parameter name="SearchMethod"/>
    ='<request:get-parameter name="Query"/>' 
   </sql:query>
  </sql:execute-query> 

which works, but Cocoon won't compile:

  <sql:execute-query>
   <sql:driver>org.gjt.mm.mysql.Driver</sql:driver>
   <sql:dburl>jdbc:mysql://localhost/mp3</sql:dburl>
   <sql:doc-element>mp3</sql:doc-element>
   <sql:row-element>author</sql:row-element>
   <sql:query>
    select author from mp3 where 
    <request:get-parameter name="SearchMethod"/>
    ='<request:get-parameter name="Query"/>' 
   </sql:query>
   <sql:row-element>url</sql:row-element>
   <sql:query>
    select url from mp3 where 
    <request:get-parameter name="SearchMethod"/>
    ='<request:get-parameter name="Query"/>' 
   </sql:query>
</sql:execute-query> 

Am I missing something?
Thanks in advance

_________________________________________________

Federica Legger
CSELT - Centro Studi e Laboratori Telecomunicazioni
Via G. R. Romoli, 274 - 10148 Torino, Italy
Phone: +39 011 228 6412
E-mail: federica.legger@cselt.it
_________________________________________________

Mime
View raw message