-
Notifications
You must be signed in to change notification settings - Fork 0
/
profiler-backup.php
43 lines (39 loc) · 1.16 KB
/
profiler-backup.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
<?php
// connect to a DSN "myDSN"
$conn = odbc_connect('s-profiler', 'sa', 'r3sult5');
echo '<h3>username name select </h3>';
// the SQL statement that will query the database
// select the yyul_login_id based on site login name
// Uses the join statement to join together the two revelent tables
$query = "SELECT * FROM dbo.users WHERE EnrolmentNo='$id'";
// perform the query
$result = odbc_exec($conn, $query);
echo "<table border=\"1\"><tr>";
// print field name
$colName = odbc_num_fields($result);
for ($j = 1; $j <= $colName; $j++)
{
echo "<th>";
echo odbc_field_name ($result, $j);
echo "</th>";
}
// fetch tha data from the database
while (odbc_fetch_row($result))
{
echo "<tr>";
for($i = 1;$i <= odbc_num_fields($result);$i++)
{
echo "<td>";
echo odbc_result($result, $i);
echo "</td>";
}
echo "</tr>";
}
echo "</td> </tr>";
echo "</table >";
echo 'exploded table';
echo $conn;
echo '<br />';
echo $query;
echo '<br />';
?>