Question about MDB2 Schema and why it does not work
| From: | Dmitri | Date: | Wed, 09 Jan 2008 23:40:21 +0000 |
| Subject: | Question about MDB2 Schema and why it does not work | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-28422@lists.php.net to get a copy of this message | ||
Hello!
I am trying to create new tables in an empty database with MDB2 Schema
It works this way:
$hdlSchema =& MDB2_Schema::factory($strDSN, $options);
$definition = $hdlSchema->parseDatabaseDefinitionFile('/usr/local/apache/sites/schema.xml');
$intCreatedTables = 0;
foreach ($definition['tables'] as $table_name => $table)
{
$result = $hdlSchema->createTable($table_name, $table, false, array());
if (PEAR::isError($result))
{
print_r($result);
break;
}
$intCreatedTables++;
}Tables are created fine. But it does not work this way: $op = $hdlSchema->updateDatabase('/usr/local/apache/sites/schema.xml'); I get error $op is Pear error: string 'MDB2 Error: insufficient permissions' -- Open Source ALL content management with streaming video http://wiki.sharedlog.com