forked from pshep/ANUBIS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigtbl.sql.php
More file actions
42 lines (35 loc) · 1.31 KB
/
Copy pathconfigtbl.sql.php
File metadata and controls
42 lines (35 loc) · 1.31 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
<?
$tblstr = "
CREATE TABLE IF NOT EXISTS `configuration` (
`yellowtemp` int(11) NOT NULL,
`yellowrejects` int(11) NOT NULL,
`yellowdiscards` int(11) NOT NULL,
`yellowstales` int(11) NOT NULL,
`yellowgetfails` int(11) NOT NULL,
`yellowremfails` int(11) NOT NULL,
`maxtemp` int(11) NOT NULL,
`maxrejects` int(11) NOT NULL,
`maxdiscards` int(11) NOT NULL,
`maxstales` int(11) NOT NULL,
`maxgetfails` int(11) NOT NULL,
`maxremfails` int(11) NOT NULL,
`email` varchar(200) NOT NULL,
`yellowfan` int(11) NOT NULL,
`maxfan` int(11) NOT NULL,
`yellowgessper` int(11) NOT NULL,
`maxgessper` int(11) NOT NULL,
`yellowavgmhper` int(11) NOT NULL,
`maxavgmhper` int(11) NOT NULL
)".$table_props.";
";
$crr = $dbh->query($tblstr);
if (!$crr) {
die('FATAL: create config error: ' . db_error());
}
$instblstr = "INSERT INTO `configuration` (`yellowtemp`, `yellowrejects`, `yellowdiscards`, `yellowstales`, `yellowgetfails`, `yellowremfails`, `maxtemp`, `maxrejects`, `maxdiscards`, `maxstales`, `maxgetfails`, `maxremfails`, `email`, `yellowfan`, `maxfan`, `yellowgessper`, `maxgessper`, `yellowavgmhper`, `maxavgmhper`) VALUES
(80, 1, 30, 7, 1, 1, 84, 2, 40, 10, 2, 2, 'change@me.com', 85, 90, 95, 90, 95, 90);";
$cri = $dbh->exec($instblstr);
if (!$cri) {
die('FATAL: DB-Error: ' . db_error());
}
?>