All pastes #717275 Raw Edit

Someone

public text v1 · immutable
#717275 ·published 2007-09-27 14:45 UTC
rendered paste body
$ php lars.php 
err MDB2_Schema Error: schema parse error

<?
include('MDB2/Schema.php');
$options = array();

$dsn = 'sqlite://test.sqlite';
$schema = MDB2_Schema::factory($dsn, $options);
if (MDB2::isError($schema)) {
    print_r($schema);
    exit;
}
$definition = $schema->parseDatabaseDefinition(dirname(__FILE__) . '/schema.xml');

if (PEAR::isError($definition)) {
    echo 'err ' . $definition->getMessage()."\n";
    exit;
} else {
    $op = $schema->updateDatabase($definition, false, array('create' => '0', 'name' => 'ticket'));

    if (PEAR::isError($op)) {

        echo 'err ' . $op->getMessage();

    }

    echo 'her';

}
?>