<%include>global.ecpp</%include>
<%args>
int id;
</%args>
<%pre>
#include <tntdb/result.h>
#include <tntdb/row.h>
</%pre>
<%cpp>

tntdb::Statement stmt = conn.prepareCached(
  "select title, ctime, long_text"
  "  from article"
  " where id = :id");

stmt.set("id", id);

tntdb::Row row = stmt.selectRow();
std::string title;
std::string time;
std::string longtext;
row[0].get(title);
row[1].get(time);
row[2].get(longtext);

</%cpp>
<html>
 <head>
  <link rel="stylesheet" type="text/css" href="newscss.css">
  <title>Ecpp-News-Demo</title>
 </head>
 <body>
  <h1 class="title"><$title$></h1>

  <p class="time"><$time$></p>

  <p class="longtext"><$longtext$></p>

  <p class="link"><a href="index">back</a></p>

 </body>
</html>
