iam try to retrieving data from multiple table and i want that data to be shown on one page.
can any one help me out what worng with this coding i cant get that resul which i want.
here is the coding
<? include("connection.php");
$q="select * from patient_detail,patient_information,patient_guardian_information,patient_discharge_information where patient_detail.patient_ID=patient_information.patient_ID and patient_information.patient_ID=patient_guardian_information.patient_ID and patient_guardian_information.patient_ID=patient_discharge_information.patient_ID";
$sql=mysql_query($q) or die(mysql_error());
$row=mysql_fetch_array($sql);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style4 {
font-family: "Comic Sans MS";
font-weight: bold;
text-decoration: underline;
text-align: center;
color: #000000;
font-size: 16px;
}
-->
</style>
</head>
<body>
<center>
<p align="center" class="style1">
WELCOME TO ONLINE INFORMATION SYSTEMS FOR HOSPITAL EMERGENCY DEPARTMENT
<p/>
<center/>
<div class="transbox1">
<div align="center">
<table width="350" height="326" border="1">
PATIENT PERSONAL INFOR/ DETAILS
<tr><th width="217"> patient ID</th>
<td width="208"><? echo $row["patient_ID"] ?></td>
</tr>
<tr> <th> first name</th><td><? echo $row["first_name"] ?></td></tr>
<tr><th> last name</th><td><? echo $row["last_name"] ?></td></tr>
<tr><th> surname</th><td><? echo $row["surname"] ?></td></tr>
<tr> <th> gender</th><td><? echo $row["gender"] ?></td></tr>
<tr><th> date of birth</th><td><? echo $row["date_of_birth"] ?></td></tr>
<tr> <th> address</th><td><? echo $row["address"] ?></td></tr>
<tr><th> phone no (home)</th><td><? echo $row["phone_no_home"] ?></td></tr>
<tr><th> phone no (mob)</th><td><? echo $row["phone_no_mob"] ?></td></tr>
<tr><th> patient occupation</th><td><? echo $row["patient_occupation"] ?></td></tr>
<tr> <th> civil status</th><td><? echo $row["civil_status"] ?></td></tr>
<tr> <th> account type</th><td><? echo $row["account_type"] ?></td></tr>
<tr><th> company name</th><td><? echo $row["company_name"] ?></td></tr>
<tr><td>patient discharge</td></tr>
<tr><th> discharge id</th><td><? echo $row["discharge_ID"] ?></td></tr>
<tr><th> admssion id</th><td><? echo $row["admission_ID"] ?></td></tr>
<tr><td>guardg</td></tr>
<tr><th> guardian id</th><td><? echo $row["guardian_ID"] ?></td></tr>
<tr><th> first name</th><td><? echo $row["patient_guardian_information.first_name"] ?></td></tr>
<tr><td>inform</td></tr>
<tr><th> admission_date</th><td><? echo $row["admission_date"] ?></td></tr>
<tr><th> admission_time</th><td><? echo $row["admission_time"] ?></td></tr>
<tr><td><input type="button" onclick="window.print()" value="PRINT IT !!!" /></td></tr>
</table>
</div>
</div>
</body>
</html>