pastorandy
IS-IT--Management
Hi
I have a CUSTOMER Tbl and a Comments Tbl and a CUSTOMER can have more than one Comment record in their Notes. i.e One to Many from Customer.
I have a Customer_ID in the Comments tbl as a foreign key.
I have a query that produces rows of customers and I have a popup window that displays the Comments in a tooltip.
The problem is I can only display one Comment entry.
Here's a simplified query...
Any idea on how I might show all the comments and not just one?
I have a CUSTOMER Tbl and a Comments Tbl and a CUSTOMER can have more than one Comment record in their Notes. i.e One to Many from Customer.
I have a Customer_ID in the Comments tbl as a foreign key.
I have a query that produces rows of customers and I have a popup window that displays the Comments in a tooltip.
The problem is I can only display one Comment entry.
Here's a simplified query...
Code:
$query5 = "SELECT contact_comment FROM comments
WHERE comments.customer_id = 1";
$result5 = mysql_query($query5) or die (mysql_error());
$contact_comment = mysql_result($result5,0,'contact_comment');
$contact_comment = str_replace(Chr(39), " ", $contact_comment );
$contact_comment = str_replace(Chr(34), " ", $contact_comment );
$contact_comment = str_replace(Chr(13), " ", $contact_comment );
$contact_comment = str_replace(Chr(9), " ", $contact_comment );
$contact_comment = str_replace(Chr(10), " ", $contact_comment );
$contact_comment = str_replace("'", " ", $contact_comment );
And then just <?=$contact_comment?>
Any idea on how I might show all the comments and not just one?