Product Documentation

FairCom SQL for PHP

Previous Topic

Next Topic

Init

First we need to open a connection to a database by providing the FairCom Database Engine with a user name, password and the database name.

Below is the code for Initialize():

//

// Initialize()

//

// Perform the minimum requirement of logging onto the c-tree Server

//

function Initialize() {

print("\t<h4>INIT</h4>\n");

// connect to server

print("\t\tLogon to server...<br>\n");

$ses = ctsql_connect("localhost:ctreeSQL", "admin", "ADMIN");

if (!$ses)

Handle_Error("ctsql_connect()");

return ($ses);

}

TOCIndex