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

 

GetOne

string GetOne()

The GetOne() function serves to obtain the first result of a query.
This function is for example useful for a 'count' query.


<?php

include("TPLN/TPLN.php");

$TPLN = new TPLN;
$TPLN->DbConnect();
$TPLN->DoQuery("SELECT count(*) FROM samples");
$count = $TPLN->GetOne();
$TPLN->DbClose();

?>


Attention !
Il ne faut pas confondre GetRowsCount() avec GetOne()
TopTop