Open Source Content Management Framework

PHP midgard_config method create_class_table

  1. Example

Creates given class table.

bool create_class_table(classname);

midgard_config method create_class_table takes one parameter:

  • classname, name of the class for which table should be created

This method may be called statically.

Returns TRUE if table has been successfully created ( or if table 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_class_table("net_nemein_wiki");
}

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