<?php
// file: exec_classes_namespace_fhDatabaseInterface.php - Aux File, version 20140304 2322
// fhDatabaseInterface; classes and functions by frank hartung
// created in php/5.5.9 for mysqlnd 5.0.11-dev - 20120503
// successfully tested with php/5.3.1 for mysqlnd 5.1.41
//
if(!defined('_sql_dbSrvHost'))
{
define('_sql_dbSrvHost' ,'');
define('_sql_dbSrvPort' ,'3306');
define('_sql_dbUser' ,'user');
define('_sql_dbPass' ,'secretpassword');
define('_sql_dbName' ,'yourdatabasename');
define('_sql_dbTblPrefix' ,'myproject_');
define('_sql_dbChartset' ,'utf8');
}
if(_sql_dbSrvHost=='')
die('please configure your database - for example on top of file exec_classes_namespace_fhDatabaseInterface.php');
if(!class_exists('fhDatabaseInterface\DatabaseConnection'))
{
echo'<br>including file: '.'classes_namespace_fhDatabaseInterface.php';
include('classes_namespace_fhDatabaseInterface.php');
}
use fhDatabaseInterface\DatabaseConnection
,fhDatabaseInterface\DatabaseQuery
,fhDatabaseInterface\DatabaseFunc
;
// echo'<br>execute file exec_classes_namespace_fhDatabaseInterface.php';
//initial process of class and its connection/functions
if(!isset($_objDbCon))
{//constants can not be arrays/objects!!
global $_objDbCon;
if(!class_exists('fhDatabaseInterface\DatabaseConnection'))
{
echo'<br>WARNING: include of file failed: classes_namespace_fhDatabaseInterface.php';
include('classes_namespace_fhDatabaseInterface.php');
}
if(!class_exists('fhDatabaseInterface\DatabaseConnection'))
echo'<br>WARNING2: include of file failed: classes_namespace_fhDatabaseInterface.php';
$_objDbCon=new fhDatabaseInterface\DatabaseConnection();
if(!is_object($_objDbCon))
die('_objDbCon-failure in DatabaseConnection');
}
if(!isset($_IdDbCon))
{
global $_IdDbCon;
$_IdDbCon=$_objDbCon->getConnectId();
if(!is_object($_IdDbCon))
die('_IdDbCon-failure in DatabaseConnection');
}
//eof
|