-
Notifications
You must be signed in to change notification settings - Fork 0
/
djcTest.php
executable file
·74 lines (42 loc) · 1.98 KB
/
djcTest.php
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
include('control/connectionVars.php');
include('classes/InstructionSession.php');
include('classes/User.php');
require_once('control/startSession.php');
// Insert the page header
$page_title = 'Dana test';
include('includes/header.php');
// $thisUser=$_SESSION['thisUser'];
?>
<h2>Test</h2>
<?php
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)
or die('Error connecting to the stupid database');
$query ="select * from iloutcomesmapview";
$result = mysqli_query($dbc, $query) or die('dang it to heck!- query issues.'.mysqli_error($dbc).$query);
if(!$result){echo "this is an outrage: ".mysqli_error($dbc).$query."\n";}
print_r($result);
echo "<br /><br />";
$xxx = $result->field_count;
$yyy = $result->num_rows;
$output='';
$output.="<br />Query: $query";
$output.="<br />Field count: $xxx <br />Number of rows: $yyy";
$output.="<br /><br />";
$i=1;
while($info=mysqli_fetch_field($result))
{
$output.="<h2> Column $i</h2>";
$output.="<br >Field name: $info->name";
$output.="<br >Source table: $info->table";
$i++;
$output.="<br />";
$output.="----------";
$output.="<br /><br />";
}
echo $output;
?>
<?php
include('includes/footer.php');
?>
<?php