string createDatabase( string $databaseName, optional mixed $databaseOptions=false )
The method createDatabase()
returns an array of strings holding the SQL necessary to create a database (or user space) on the current DBMS. To actually execute the code, the output must be passes to executeSqlArray.
/* * On an Oracle system */ $dict = newdataDictionary($db); print_r($dict->createDatabase('ADODB_TEST')); /* * Returns Array ( [0] => CREATE USER ADODB_TEST IDENTIFIED BY tiger [1] => GRANT CREATE SESSION, CREATE TABLE,UNLIMITED TABLESPACE,CREATE SEQUENCE TO ADODB_TEST ) */