|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2014-12-08 00:16 UTC] requinix@php.net
 
-Status: Open
+Status: Feedback
  [2014-12-08 00:16 UTC] requinix@php.net
  [2014-12-23 19:08 UTC] ab@php.net
 
-Status: Feedback
+Status: No Feedback
  [2014-12-23 19:08 UTC] ab@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 13:00:01 2025 UTC | 
Description: ------------ lost connection in oophp so i have 3 object and every object wil get a connection to the database(not static) every object has an __destruct and wil kill his $DB Test script: --------------- <?php namespace users; class Overview_model extends \Model{ private $isinstalled =false; private $DB ; public function __construct() { $conn = new \DBmyConn();//mysqlconnection $this->DB = $conn->GET(); $this->isinstalled = self::isInstalled(); } public function __install(){ } public function isInstalled(){ return $this->isinstalled ||$this->existTableAccound(); } private function existTableAccound(){ $database = \DBConn::GET();//PDO=>mysql $dbResult = $database->query("SHOW TABLES LIKE '".\DBConn::getTableNameFor('accound')."'"); return $dbResult->rowCount()==1 ; } public function save(){ if(!$this->isinstalled){return false;} try { $commit = true; mysql_query("SET AUTOCOMMIT=0",$this->DB); mysql_query("START TRANSACTION",$this->DB); $sql[''] = ""; if(!mysql_query($sql[''])){ $commit = false;} $sql[''] = ""; if(!mysql_query($sql[''])){ $commit = false;} return ($commit)? mysql_query("COMMIT",$this->DB): mysql_query("ROLLBACK",$this->DB); }catch (PDOException $e) { @mysql_query("ROLLBACK",$this->DB); return false; } } public function __destruct() { @$this->DB->close();// this wil kill al other connections //of new \DBmyConn() $this->DB=null; } public function killcon(){ mysql_query("ROLLBACK",$this->DB); $this->__destruct(); } public function getModelInfo(){ return "UsersOverview.model.info"; } public function getVersionNr(){ return (float)3.0; } } ?> Expected result: ---------------- so You can not see anything it is a part of prototype of a cms autosite