-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.php
More file actions
29 lines (25 loc) · 750 Bytes
/
main.php
File metadata and controls
29 lines (25 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
require("util/config.php");
$conf = new mosBase\config();
$conf->init(getenv("mosBaseIni"));
$dbconf = $conf->get("Database");
try {
$pdo = new mosBase\database($dbconf["dsn"], $dbconf["user"], $dbconf["password"]);
$log = new mosBase\log("AUDIT", $pdo);
$log->log("system","startup",__FILE__,__FUNCTION__,__LINE__, "AUDIT");
/* $keys = array("primary"=>array("id"), "foo"=>array("intti", "merkkijono"));
$taulu = "testi";*/
$keys = array(array("primary"=>"tunniste"));
$taulu="peli";
$malli = new mosBase\malli($pdo, $log, $taulu, $keys);
$d=array("tunniste"=>6143);
$r=$malli->exists($d);
if($r) {
var_dump($malli->give());
}
}
catch (PDOException $e) {
printf(_("Tietokantavirhe: %s\n"),$e->getMessage());
die();
}
?>