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

 

GetFieldName

string GetFieldName(int $field_no)

The GetOne() function serves to obtain the name of a field of your query.


<?php

include("TPLN/TPLN.php");

$TPLN = new TPLN;
$TPLN->DbConnect();
$TPLN->DoQuery("SELECT * FROM samples");
$count_fields = $TPLN->GetNumFields();

for(
$i=0;$i<$count_fields;$i++)
{
echo
"field $i -> ".$TPLN->GetFieldName($i)."<br>";
}

$TPLN->DbClose();

?>


Attention !
This is a experimental version, it's better to use GetFields()
TopTop