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

 

DBFetchAssoc

array DBFetchAssoc()

The DBFetchAssoc() function serves to obtain the results for a query in an structured array.


<?php

include("TPLN/TPLN.php");

$TPLN = new TPLN();
$TPLN->DbConnect(); // connect with default config
$TPLN->DoQuery("SELECT * FROM samples");
$res = $TPLN->DBFetchAssoc(); // result in a structured array
$TPLN->DbClose();

?>


Attention !
For reasons of performances, it is preferable to use this function rather than DBFetchArray()
TopTop