/**
  *	Zend Model Creator 2
  */
 public function __construct($settings)
 {
     // Set settings
     $this->_settings = $settings;
     // Set the namespace, if it should change
     if ($settings['namespace'] != null) {
         self::$_namespace = $settings['namespace'];
     }
     // Open db connection
     if (!($this->_dbcon = mysql_connect($this->getSetting('mysql_host'), $this->getSetting('mysql_user'), $this->getSetting('mysql_password')))) {
         die("Can't connect to database");
     }
     if (!mysql_select_db($this->getSetting('mysql_db'), $this->_dbcon)) {
         die("Can't select database");
     }
     // set tables
     $this->_setTables();
     $this->_setTableData();
     // close connection
     mysql_close($this->_dbcon);
 }