Location: PHPKode > scripts > Extensible Template > doc/bltag_recordset.txt
This plugin implements a fake <tpl:recordset></tpl:recordset> tag. The only purpose is to show you how to code your own
tag related plugins.

This tag has the following syntax:

<tpl:recordset 
    TYPE="rs_type" 
    INTERNALNAME="internal_name" 
    SELECTQUERY="query"
    >
....
....
....
....
</tpl:recordset>

the TYPE parameter can have one of the following values:

mysql|pgsql|msql|sqlite

INTERNALNAME is the name to be used inside the HTML block

SELECTQUERY would be the SQL select query that should return records 


HTML example:

<table width="100%" border="0" cellpadding="0">
<tpl:recordset type="mysql" internalname="users" selectquery="select * from users limit 0,10">
<tr><td>{users.user_id}</td><td>{users.user_name}</td></tr>
</tpl:recordset>
</table>

That HTML snippet would do a query against a database, and return up to 10 records from a "users" table
and would generate one <tr></tr> row in the table for each record returned by the query

Again, the tag plugin DOES NOT call any database function, as it has no host, username or password parameters,
although you can easily add those features. I'll let it as home work for you :D

Return current item: Extensible Template