cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Yates <>
Subject Re: built sql query
Date Mon, 10 Jul 2000 16:05:45 GMT
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
This works for me using url:
<br><A HREF="http://blah/db.xml?columns=*&table=sometable&amp;amp;column=id&amp;amp;parameter=50">http://blah/db.xml?columns=*&amp;table=sometable&amp;amp;column=id&amp;amp;parameter=50</A>
<p>&lt;?xml version="1.0"?>
<br>&lt;?cocoon-process type="xsp"?>
<br>&lt;?cocoon-process type="sql"?>
<br>&lt;?cocoon-process type="xslt"?>
<br>&lt;?xml-stylesheet type="text/xsl" href="db.xsl"?>
<br>&nbsp; language="java"
<br>&nbsp; xmlns:xsp="<A HREF=""></A>">
<br>&nbsp; &lt;connection name="connection">
<br>&nbsp;&nbsp; &lt;driver>{driver}&lt;/driver>
<br>&nbsp;&nbsp; &lt;dburl>{dburl}&lt;/dburl>
<br>&nbsp;&nbsp; &lt;username>{username}&lt;/username>
<br>&nbsp;&nbsp; &lt;password>{password}&lt;/password>
<br>&nbsp; &lt;/connection>
<br>&nbsp;&lt;query connection="connection">
<br>&nbsp; select &lt;xsp:expr>request.getParameter("columns")&lt;/xsp:expr>
<br>&nbsp; from &lt;xsp:expr>request.getParameter("table")&lt;/xsp:expr>
<br>&nbsp; where &lt;xsp:expr>request.getParameter("column")&lt;/xsp:expr>
<br>&nbsp; = '&lt;xsp:expr>request.getParameter("parameter")&lt;/xsp:expr>'
<p>Torsten Curdt wrote:
<blockquote TYPE=CITE>I know now how to do and display a sql query with
<br>But can anyone show me a good way to do a built query?
<p>I mean a query that is modified by the parameters passed
<br>to the page (a very common task)
<p>something like:
<p>show.xml?id=50 -> select * from sometable where tableid=50
<p>actually the question is: how can I pass my java built
<br>sql string to the sql processor?
<br>To unsubscribe, e-mail:
<br>For additional commands, e-mail:</blockquote>

<A HREF=""></A></pre>

View raw message