Complex XSP: connecting to database


<esql:connection>
<esql:driver transactions='no'>Pg</esql:driver>
<esql:dburl>dbname=cem;host=localhost;port=5432</esql:dburl>
<esql:username>www-data</esql:username>
<esql:password></esql:password>
<esql:execute-query>
<esql:query>select numb,forename,surname 
from persons where numb < 50</esql:query>
<esql:results>
<table>
<esql:row-results>
<row><cell><id><esql:get-int column="numb"/></id></cell>
<cell><esql:get-xml column="surname"/></cell></row>
</esql:row-results>
</table>
</esql:results>
</esql:execute-query>
</esql:connection>

26 Next | First| Previous Practical XML under Apache