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

 

ChangeConnection

void ChangeConnection(int $db_index)

The DoQuery() function serves to change your connexion domain.


<?php

$TPLN
= new TPLN;
$TPLN->DbConnect(); // connect to default config (id = 0)
$TPLN->DbConnect('ibase','server','login','root','base'); // another domain on an Interbase server ($id = 1)

$TPLN->ChangeConnection(0);
$TPLN->DoQuery("$my_qry"); // execute a query in first server

$TPLN->ChangeConnection(1);
$TPLN->DoQuery("$my_qry"); // execute a query in second server

?>


TopTop