HI All,
I have this script. (See below) it was designed to allow my case managers to
look at a list of the case noted they have generated on a specific client.
It allows the case manager to select the client and then it shows them the
case note.  Only problem is that it only shows them one case note, and most
of the clients will have several case notes that have been entered over the
period of the program.
Can anyone offer any suggestions.
Keep the faith
<title>Wireless Neighborhoods</title>
</head>  <?php
// Set the page title and include the HTML header.
$page_title = 'Wireless Neighborhoods';
include_once ('include/header.html');
$db_connection = mysql_connect ('localhost', 'root', 'becky') or die
$db_select = mysql_select_db('testDB') or die (mysql_error());
// Note: since ID id often used to indicate the autonumber record in a
table, you may want to make the
// client id field in the case_note table have the column name of
'client_id'. then you know where it came from
 $query = "select ca.*, CONCAT(cl.fname, ', ', cl.lname) AS display_name
from case_note ca inner join clients cl on clients.id = case_note.id";
    $result = mysql_query($result);
 if ($result && mysql_num_rows($result)>0)
   $row = mysql_fetch_array($result);
<font face="Verdana">
<body bgcolor="#F0FFFD">
<p><font size="5">CTC Database Contact Log</font></p><?php
//Prints something like: Monday 15th of January 2003 05:51:38 AM
echo date("l dS of F Y -- h:i:s A");//Prints something like: Monday the 15th
<table width="100%">
<tr><td width="30%">Client Name:</td><td><?php $row['name']
<tr><td>Contact Date:       </td><td> <?php echo $row['date_added']; ?>
<tr><td>Case Manager:       </td><td> <?php echo $row['cmanager']; ?>
<tr><td>Purpose of Contact: </td><td> <?php echo $row['purpose']; ?>
<tr><td>Location of Contact:</td><td> <?php echo $row['location']; ?>
<tr><td>Present at Contact: </td><td> <?php echo $row['present']; ?>
<tr><td>Subject:            </td><td> <?php echo $row['subject']; ?>
<tr><td>Notes:              </td><td> <?php echo $row['note']; ?>
include_once ('include/footer.html');

Reply via email to