-
Notifications
You must be signed in to change notification settings - Fork 4
/
ViewAnyTable.php
122 lines (91 loc) · 2.16 KB
/
ViewAnyTable.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
require_once("header.php");
?>
<b><br><font size = "4" type="arial">Add event/Work In Progress/Unconfirmed Order for Customer</b></font>
</br>
</br>
<form name="bkp" action="ViewAnyProcess.php" method="post">
<select name="mydropdownEC" onchange='this.form.submit()'>
<option value="_no_selection_">Select Table</option>";
<?php
require_once("inc_OnlineStoreDB.php");
$query1 = "SHOW TABLES";
echo $query1;
$result = $DBConnect->query($query1);
while ( $row = $result->fetch_row() ){
$table = $row[0];
echo '<h3>',$table,'</h3>';
//while ($row = mysql_fetch_assoc($result)) {
//if ($result = mysqli_query($DBConnect, $query1)) {
// while ($row = mysqli_fetch_row($result)) {
print "<option value='$table'>$table";
//print "_".$table;
//print "<option value='$item2'>$item2";
//print "<option value='$item3'>$item3";
print "</option>";
}
// mysqli_free_result($result);
// }
// mysqli_close($link);
?>
<input type="submit" name="btn_submit" value="select table" />
</select></p>
<br>
<br>
transaction<br>
aproof<br>
(comment)<br>
customer<br>
domaions<br>
events<br>
expenses<br>
expensese<br>
expensesh<br>
hprofits (bank)<br>
ledgernotes<br>
lpr<br>
norton (not used)<br>
prices<br>
prices2 <br>
streets<br>
streetsOH<br>
streetsOHarea<br>
streetsohblk<br>
transaction<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<?php
/*
$result = $DBConnect->query("SHOW TABLES");
while ( $row = $result->fetch_row() ){
$table = $row[0];
echo '<h3>',$table,'</h3>';
$result1 = $DBConnect->query("SELECT * FROM $table");
if($result1) {
echo '<table cellpadding="0" cellspacing="0" class="db-table">';
$column = $DBConnect->query("SHOW COLUMNS FROM $table");
echo '<tr>';
while($row3 = $column->fetch_row() ) {
echo '<th>'.$row3[0].'</th>';
}
echo '</tr>';
while($row2 = $result1->fetch_row() ) {
echo '<tr>';
foreach($row2 as $key=>$value) {
echo '<td>',$value,'</td>';
}
echo '</tr>';
}
echo '</table><br />';
}
}
$DBConnect->close();
*/
?>