Sample> Db Showrecords Order By

<?php

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

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

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

$TPLN->dbConnect();
$TPLN->showRecordsOrderBy(array('Code''Name')); // filter
$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 {_order_by::Code}</th>
    <th>Name {_order_by::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>