-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata.php
126 lines (108 loc) · 2.46 KB
/
data.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
123
124
125
126
<?php
session_start();
include "data.html";
echo "<h1 id='appoint_title'>Qoutation List For Manager</h1>";
$mysqli = new mysqli("localhost", "root", "root","hospital");
if ($mysqli->connect_error) {
die("Connection failed: " . $mysqli->connect_error);
}
//------------Side1------------------
//-------------Crocin------------
$query="SELECT * FROM `v1` WHERE `items` LIKE 'Crocin' ORDER BY `amount` ASC,`quantity` DESC";
$result=mysqli_query($mysqli,$query);
echo"<div class=side>
<table class='Crocin'>
<tr><th colspan=6>For Crocin</th></tr>
<tr>
<th>Company's Name</th>
<th>Item</th>
<th>Quantity</th>
<th>Total</th>
<th>Discount</th>
<th>Amount</th>
</tr>";
while($row=mysqli_fetch_row($result)){
echo "<tr>
<td>$row[0]</td>
<td>$row[1]</td>
<td>$row[2]</td>
<td>$row[3]</td>
<td>$row[4]</td>
<td>$row[5]</td>
</tr>";
}
echo"</table>";
//------------Asprin------------
$query="SELECT * FROM `v1` WHERE `items` LIKE 'Aspirin' ORDER BY `amount` ASC,`quantity` DESC";
$result=mysqli_query($mysqli,$query);
echo"<table class='Aspirin'>
<tr><th colspan=6>For Aspirin</th></tr>
<tr>
<th>Company's Name</th>
<th>Item</th>
<th>Quantity</th>
<th>Total</th>
<th>Discount</th>
<th>Amount</th>
</tr>";
while($row=mysqli_fetch_row($result)){
echo "<tr>
<td>$row[0]</td>
<td>$row[1]</td>
<td>$row[2]</td>
<td>$row[3]</td>
<td>$row[4]</td>
<td>$row[5]</td>
</tr>";
}
echo"</table></div>";
//-------Side2----------
//-------------Disprin------------
$query="SELECT * FROM `v1` WHERE `items` LIKE 'Dispirin' ORDER BY `amount` ASC,`quantity` DESC";
$result=mysqli_query($mysqli,$query);
echo"<div class='side'><table class='Dispirin'>
<tr><th colspan=6>For Dispirin</th></tr>
<tr>
<th>Company's Name</th>
<th>Item</th>
<th>Quantity</th>
<th>Total</th>
<th>Discount</th>
<th>Amount</th>
</tr>";
while($row=mysqli_fetch_row($result)){
echo "<tr>
<td>$row[0]</td>
<td>$row[1]</td>
<td>$row[2]</td>
<td>$row[3]</td>
<td>$row[4]</td>
<td>$row[5]</td>
</tr>";
}
echo"</table>";
//---------Diclogem----------
$query="SELECT * FROM `v1` WHERE `items` LIKE 'Diclogem' ORDER BY `amount` ASC,`quantity` DESC";
$result=mysqli_query($mysqli,$query);
echo"<table class='Diclogem'>
<tr><th colspan=6>For Diclogem</th></tr>
<tr>
<th>Company's Name</th>
<th>Item</th>
<th>Quantity</th>
<th>Total</th>
<th>Discount</th>
<th>Amount</th>
</tr>";
while($row=mysqli_fetch_row($result)){
echo "<tr>
<td>$row[0]</td>
<td>$row[1]</td>
<td>$row[2]</td>
<td>$row[3]</td>
<td>$row[4]</td>
<td>$row[5]</td>
</tr>";
}
echo"</table></div>";
?>