Open Source Content Management Framework

PHP midgard_config method create_midgard_tables

  1. Example

Creates all internal midgard tables.

bool create_midgard_tables(void);

midgard_config method create_midgard_tables takes no parameters.

This method may be called statically.

Creates midgard internal tables for all classes not defined in xml schema file.

Returns TRUE if tables has been successfully created ( or if tables already exist ), FALSE otherwise.

Example

<?php

try {
    $config = new midgard_config();
} catch (Exception $e) {
    echo $e->getMessage();
}

$config->dbtype = "SQLite";
$config->database = "midgard";

if(!$config->save_file("my_personal_db", true)) 
{
    echo "Could not save configuration!"; 
}

try {
    $midgard = new midgard_connection();
} catch (Exception $e) {
    echo $e->getMessage();
}

if($midgard->open_config($config))
    midgard_config::create_midgard_tables();

?>
Tagged
ragnaroek
vinland
Designed by Nemein, hosted by Anykey