Example #1
0
 /**
  * Provides an only instance for this class
  * @return MySqlRunQuery
  */
 public static function getInstance()
 {
     if (self::$_instance == null) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Example #2
0
 public static function GenerateTables()
 {
     $db = MySqlRunQuery::getInstance();
     include_once APPLICATION_PATH . '/models/DBTables.class.php';
     $tables = get_class_methods('DBTables');
     foreach ($tables as $table) {
         $query = DBTables::$table();
         $db->run($query);
     }
 }