RE: [PHP-DB] More problems with a script. How to I get to a next entry

2005-05-19 Thread Bastien Koert
you need to adjust the sql to remove some of the limiters in the where 
clause. ie remove the dates. Just join on the ids that should get you what 
you need...

Bastien
From: "John R. Sims, Jr." <[EMAIL PROTECTED]>
To: , 
Subject: [PHP-DB] More problems with a script.  How to I get to a next 
entry
Date: Thu, 19 May 2005 12:20:24 -0400

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
John



Wireless Neighborhoods
  
$db_connection = mysql_connect ('localhost', 'root', 'becky') or die
(mysql_error());
$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);
 }
?>


CTC Database Contact Log
//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
?>


Client Name:
?>

Contact Date:

Case Manager:

Purpose of Contact:  

Location of Contact: 

Present at Contact:  

Subject: 

Notes:   





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] More problems with a script. How to I get to a next entry

2005-05-19 Thread John R. Sims, Jr.
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
 
John
 
 
 

 

 
Wireless Neighborhoods
  0)
 {
   $row = mysql_fetch_array($result);
 
 }
?>


 
CTC Database Contact Log


Client Name:
 
Contact Date:

Case Manager:

Purpose of Contact:  

Location of Contact: 

Present at Contact:  

Subject: 

Notes: