コード例 #1
0
ファイル: DataObject.php プロジェクト: philfree/radria
 /**
  * Default constructor
  * To be called from child class first with parent::__construct($conx)
  * with a valid database connection object.
  *
  * @param sqlConnect Active Database connection.
  * @return true on success.
  */
 function __construct(SqlConnect $conx = NULL, $table_name = "")
 {
     if (is_null($conx)) {
         $conx = $GLOBALS['conx'];
     }
     parent::__construct($conx);
     if (defined("RADRIA_LOG_RUN_DATAOBJECT")) {
         $this->setLogRun(RADRIA_LOG_RUN_DATAOBJECT);
     }
     //$this->dbCon = $conx;
     if (!is_resource($this->dbCon->id)) {
         $this->setError("DataObject Error: No open or valid connexion has been provide to execute the query. ");
         return false;
     }
     if (!empty($table_name)) {
         $this->setTable($table_name);
     }
     return true;
 }