RedBeanPHP\Adapter\DBAdapter::getDatabase PHP Method

getDatabase() public method

See also: Adapter::getDatabase
public getDatabase ( )
    public function getDatabase()
    {
        return $this->db;
    }

Usage Example

Example #1
0
 /**
  * @see QueryWriter::createTable
  */
 public function createTable($table)
 {
     $table = $this->esc($table);
     $encoding = $this->adapter->getDatabase()->getMysqlEncoding();
     $sql = "CREATE TABLE {$table} (id INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY ( id )) ENGINE = InnoDB DEFAULT CHARSET={$encoding} COLLATE={$encoding}_unicode_ci ";
     $this->adapter->exec($sql);
 }
All Usage Examples Of RedBeanPHP\Adapter\DBAdapter::getDatabase