Hello everyone,
I am having a bit of a problem. The code below allows me to query a db with some physicians in it. The code works fine until ti gets to the "Description" where it creates a new output for each piece that is in the description such as if the doctor went to Baylor for graduate school and Presbyterian Hospital of Dallas for their Internship, it will creat to complete outputs one with Baylor and one with Presbyterian Hospital but not with both. What am I doing wrong? Thanks for the assitance:
<html>
<head>
<title>Physician Listing</title>
<link rel="stylesheet" type="text/css" href="normal.css">
</head>
<body>
<?php
// Database connection variables
$dbServer = "10.100.0.238";
$dbDatabase = "test";
$dbUser = "";
$dbPass = "";
$sConn = mysql_connect($dbServer, $dbUser, $dbPass)
or die("Couldn't connect to database server");
$dConn = mysql_select_db($dbDatabase, $sConn)
or die("Couldn't connect to database $dbDatabase");
$dbQuery = "SELECT LastName,FirstName,Thumbnail,Specialty,Address1,City,State,Zip,Phone,Degree,Description ";
$dbQuery .= "FROM physicians, physicianspecialties, specialties, physicianbiocategories, biocategories ";
$dbQuery .= "WHERE physicians.PhysicianID=physicianspecialties.PhysicianID AND ";
$dbQuery .= "physicians.PhysicianID=physicianbiocategories.PhysicianID AND ";
$dbQuery .= "physicianspecialties.SpecialtyID=specialties.SpecialtyID AND ";
$dbQuery .= "physicianbiocategories.BioCategoryID=biocategories.BioCategoryID AND ";
$dbQuery .= "specialties.Specialty LIKE 'Anesthesiology' ";
$dbQuery .= "ORDER by Specialty ASC";
$result = mysql_query($dbQuery) or die("Couldn't get file list");
$base="http://www.wnj.org";
?>
<br>
<table width="500" align="center" cellpadding="2" cellspacing="0" border="0">
<?
while($row = mysql_fetch_array($result))
{
print "<tr><td width=\"250\" align=\"center\" class=\"bio\"><img src=\"".$base.$row["Thumbnail"]."\"><br>";
print $row["FirstName"];
print " ";
print $row["LastName"];
print " ";
print $row["Degree"];
print " <br>";
print $row["Address1"];
print "<br>";
print $row["City"];
print ", ";
print $row["State"];
print "<br>";
print $row["Zip"];
print "<br>";
print $row["Phone"];
print "<br>";
print $row["Description"];
print "<br>";
print "</td></tr>";
}
?>
</table>
</body>
</html>