Home | Online Examples | Documentation | Forum | Page of Project | Download

TPLN Manual

DB functions

ParseDBRow
ParseDBField
DbConnect
ChangeConnection
DbClose
DoQuery
GetRowsCount
DBFetchArray
DBFetchAssoc
DBFreeResult
GetOne
GetNumFields
GetFields
GetFieldName
GetDBList
GetTableList

 

ParseDBField

void ParseDBField(string $blocname, array fields, [string parse_function])

ParseDBField() serves to parse all variables of a bloc by values returned by a field_name of your query.


<?php
$TPLN
->Open("template.html");

$TPLN->DbConnect();
$fields = $TPLN->GetFields("SELECT * FROM my_table");
$TPLN->ParseDBField("bloc1",$fields,"|strtoupper"); // Parse field and use php strtoupper function
$TPLN->DbClose();

$TPLN->Write();
?>


Attention !
Since TPLN 1.5
TopTop