Show Records

The ShowRecords() allows you to create pagination from the resultset of your database automatically.

You have only to create your template and this method make all the tasks for you !

Your template must be configured like this :
<bloc::data> 

    Record {_First} to {_Last} - Total : {_Count}
    <bloc::loop>
        {MyColumnName1} | {MyColumnNamle2} | ....
    <bloc::loop>


    <bloc::start>
<a href="{_Url}"> « </a> </bloc::start>
    <bloc::previous>
<a href="{_Url}"> ‹ </a> </bloc::previous>

    <bloc::pager>
        <bloc::in>
{_Page}</bloc::in>
        <bloc::out>
<a href="{_Url}">{_Page}</a></bloc::out>
    </bloc::pager>

    <bloc::next>
<a href="{_Url}"> › </a> </bloc::next>
    <bloc::end>
<a href={_Url}""> » </a> </bloc::end>


    <bloc::norecord>
    No record found message
    </bloc::norecord>

</bloc::data>


This component has properties variables automatically parsed and must be present inside the block and must be present inside the block :

  • {_First} show the number of the first records of the page in progress
     
  • {_Last} show the number of the last records of the page in progress
     
  • {_Count} show the count of the results
     
  • {_PageNumber} show the page in progress
     
  • {_PageCount} show the count of page total
     

Properties variables between block loop :

  • {_Id} show the record number's generate by the TPLN
     
  • {_NavColor} substitute by one of the two colors specified inside the file TPLN_Cfg.php or by  SetNavColor()

     

Only blocks data, loop and norecord are required 

 

Please see online examples : 

- Db Showrecords
- Db Showrecords Order By
- Db Showrecords Ajax
- Db Showrecords Hook2
- Db Showrecords Advanced
- Db Showrecords Breaker
- Db Showrecords Array


{CommentNb} Comments for "Show Records"

Add new post for "Show Records"

Allowed xhtml tags : [b], [i], [u], [strike], [blockquote], [span], [code]

Powered by made with TPLN Template! version 3.6 in 0.0007 s (4 queries executed) - rss
Propulsed by Nuts™ CMS - Content Management System
    Open Source Solution proposed by H2LSOFT (France)