PHP Classes

File: doc/bltag_recordset.txt

Recommend this page to a friend!
  Classes of Daniel Andres Marjos  >  Extensible Template  >  doc/bltag_recordset.txt  >  Download  
File: doc/bltag_recordset.txt
Role: Documentation
Content type: text/plain
Description: Sample plugin documentation
Class: Extensible Template
Template engine extensible using sub-classes
Author: By
Last change:
Date: 13 years ago
Size: 1,160 bytes


Class file image Download
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:


the TYPE parameter can have one of the following values:


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">

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

For more information send a message to info at phpclasses dot org.