summaryrefslogtreecommitdiff
path: root/doc/niels-diplom/Dateistruktur/connect.php
blob: aeb191f570e1bd62a1d230366388ebb6f68933eb (plain)
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
43
<?php

$dbuser="nils";
$dbpass="dbprakt";
/* Datenbanklogin */

$createuser="creator";
$createpass="creator";
/* Datenbanklogin */


PutEnv("TWO_TASK=dbprakt");


function dbconnect($sql)
{
	

	global $dbuser, $dbpass;
	
	$con = OCILogon($dbuser, $dbpass);
	
	$stmt = OCIParse($con, $sql);

	return $stmt;

	OCILogoff($con);
}

function createconnect($sql)
{
	

	global $createuser, $createpass;
	
	$con = OCILogon($createuser, $createpass);
	
	$stmt = OCIParse($con, $sql);

	return $stmt;

	OCILogoff($con);
}