Esempio n. 1
0
 /**
  * Set the details used to connect to the database
  * @param	string	Database server name
  * @param	string	Database name
  * @param	string	Username
  * @param	string	Password
  */
 public static function setDetails($host, $dbname, $username, $password)
 {
     self::$host = $host;
     self::$dbname = $dbname;
     self::$username = $username;
     self::$password = $password;
 }
Esempio n. 2
0
            new Compile($newer);
        }
        return $newer;
    }
    public static function goToTable($table)
    {
        if (preg_match_all(sprintf(Initialize::$replace["goToTable"], $table, $table, $table), Compose::databaseFile2(), $codes)) {
            new Compile($codes);
        } else {
            echo "nej";
        }
    }
}
$db = new Database("test", "testUsername", "testPassword");
$db->database();
$db->username();
$db->password();
$db->comments();
$db->tables();
new Compile(Compose::databaseTableRows());
// COLLECT * FROM Accounts
$test = Compose::databaseTableRows()["Accounts"];
//new Compile($test);
foreach (Compose::databaseTableRows()["Accounts"] as $key => $value) {
    echo $value["Username"] . '<br>';
}
//echo Compose::databaseUsername() . '<br>';
//echo Compose::databasePassword();
//new Compile(Compose::databaseCode());
echo '<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
	<br><br><br><br><br><br><br><br><pre>' . file_get_contents("databases/test.rdb") . '</pre>';
Esempio n. 3
0
 public static function databaseUsername($username)
 {
     Database::$username = $username;
 }