Sample> Db Showrecords

<?php

// include TPLN
include('TPLN/TPLN.php');

$TPLN = new TPLN;
$TPLN->open('Db_showrecords.html');

$TPLN->setNavColor('#ffffff','#ffffc0'); // change colors
$TPLN->setUrl('?'); // optional take current page by default

$TPLN->dbConnect();
$TPLN->showRecords('SELECT * FROM Country'10); // only 10 results by page
$TPLN->dbClose();

$TPLN->write();



?>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>TPLN - DB function ShowResult Sample</title>
    <link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body>

<bloc::data>
<table cellpadding="3" cellspacing="1">
<caption>Results {_First} to {_Last} of {_Count}</caption>
<tr>
    <th>Code</th>
    <th>Name</th>
    <th>Chief</th>
</tr>

<bloc::loop>
<tr>
    <td bgcolor="{_NavColor}">{Code}</td>
    <td bgcolor="{_NavColor}">{Name}</td>
    <td bgcolor="{_NavColor}">{HeadOfState}</td>
</tr>
</bloc::loop>

<tr>
    <th colspan="3">
        <bloc::previous>
            <a href="{_Url}"><img src="../previous.gif" align="absmiddle" /></a>
        </bloc::previous>

        Page {_PageNumber} / {_PageCount}

        <bloc::next>
            <a href="{_Url}"><img src="../next.gif" align="absmiddle" /></a>
        </bloc::next>
    </th>
</tr>

</table>



    <bloc::norecord>You have no record found</bloc::norecord>
</bloc::data>

<br>
<br>
{_Logo}<font size="1"> in {_Chrono} s<br>
Queries executed: {_QueryCount}</font>

</body>
</html>