protected function DoPrepare() { parent::DoPrepare(); cmdbSource::CreateTable('CREATE TABLE `myTable` (myKey INT(11) NOT NULL auto_increment, column1 VARCHAR(255), column2 VARCHAR(255), PRIMARY KEY (`myKey`)) ENGINE = ' . MYSQL_ENGINE); cmdbSource::CreateTable('CREATE TABLE `myTable1` (myKey1 INT(11) NOT NULL auto_increment, column1_1 VARCHAR(255), column1_2 VARCHAR(255), PRIMARY KEY (`myKey1`)) ENGINE = ' . MYSQL_ENGINE); cmdbSource::CreateTable('CREATE TABLE `myTable2` (myKey2 INT(11) NOT NULL auto_increment, column2_1 VARCHAR(255), column2_2 VARCHAR(255), PRIMARY KEY (`myKey2`)) ENGINE = ' . MYSQL_ENGINE); }
private function __construct() { try { self::$instance = new PDO('oci:dbname=FISHEYE.WORLD;charset=UTF8', 'FISHEYECNS', 'FISHEYECNS'); self::$instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (Exception $e) { echo 'Erreur : ' . $e->getMessage() . '<br />'; echo 'N° : ' . $e->getCode(); // phpinfo(); } }