-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtry1.php
68 lines (57 loc) · 3.49 KB
/
try1.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
<?php
error_reporting(0);
$q=$_GET["q"];
$con = mysql_connect('localhost', 'root');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("399lovelypets", $con);
$sql="SELECT * FROM pet INNER JOIN petowner ON pet.PetOwnerID = petowner.PetOwnerID INNER JOIN clinic ON pet.ClinicID = clinic.ClinicID WHERE PetID = '".$q."'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{ echo "<div class='city'>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Pet ID: </strong>" . $row['PetID'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Pet Name: </strong>" . $row['PetName'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Pet Species: </strong>" . $row['PetSpecies'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Pet Gender: </strong>" . $row['PetGender'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Pen ID: </strong>" . $row['PenID'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Pet Owner's Name: </strong>" . $row['PetOwnerName'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Clinic: </strong>" . $row['ClinicName'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Pet Description: </strong>" . $row['PetDescription'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Pet Condition: </strong>" . $row['PetCondition'] . "<br><br>";
echo "<div>";
}
mysql_close($con);
?>
<br>
<?php
error_reporting(0);
$q=$_GET["q"];
$con = mysql_connect('localhost', 'root');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("399lovelypets", $con);
$sql="SELECT * FROM treatmentrecord INNER JOIN staff ON treatmentrecord.DoctorID=staff.StaffID WHERE PetID = '".$q."'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{ echo "<div class='city' >";
echo "<hr><br><br>";
echo "<h2 style='margin-left:30px;'>Treatment Record</h2><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Treatment Record ID: </strong>" . $row['TreatmentRecordID'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Doctor ID: </strong>" . $row['DoctorID'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Doctor Name: </strong>" . $row['StaffName'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Room: </strong>" . $row['RoomID'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Treatment Start Time </strong>" . $row['TreatmentStartTime'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Treatment Start Date: </strong>" . $row['TreatmentDate'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Treatment End Time: </strong>" . $row['TreatmentEndTime'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Treatment End Date: </strong>" . $row['TreatmentEndDate'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Treatment Process Description: </strong>" . $row['TreatmentProcessDescription'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Treatment Result: </strong>" . $row['TreatmentResult'] . "<br><br>";
echo "<strong style='color: darkgrey; margin-left:30px;'>Treatment Result Description: </strong>" . $row['TreatmentResultDescription'] . "<br><br>";
echo "<div>";
}
mysql_close($con);
?>