Re: Highlighting data selected from one table that appear in another
| From: | boclair | Date: | Thu, 01 Sep 2005 22:39:17 +0000 |
| Subject: | Re: Highlighting data selected from one table that appear in another | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-40198@lists.php.net to get a copy of this message | ||
Miles Thompson wrote:
At 08:50 AM 9/1/2005, boclair wrote:Exactly the way to handle this, LEFT OUTER JOIN. I only thought I understood how to do these joins. Good article simply written for a simple brain. Many thanks. LouiseContent-Type: multipart/alternative;It sounds like you need an OUTER JOIN, which lets you fetch all the records from table A and table B that match, as well as the non-matching records from table B. The MySQL documents are a little confusing, here's a good article: http://www.onlamp.com/pub/a/onlamp/2001/06/27/aboutSQL.html Miles,boundary="------------070700030402040702060708" X-Authentication-Info: Submitted using SMTP AUTH PLAIN at omta05ps.mx.bigpond.com from [138.130.220.111] using ID boclair at Thu, 1 Sep 2005 11:49:59 +0000This is a multi-part message in MIME format. --------------070700030402040702060708 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit mysql 4.0.25 php 4.3.1 I seem to be unable to solve this problem without some help. A webpage is to list all the clients in a mysql " Client" table. Each client has an an allocated clid. Those clients who are listed, identified by their allocated clid, in a "Transactions" are to be highlighted in different ways according to progress of the transaction, the progress being determined on whether date values have been inserted into various fields. Since mysql select joining the tables lists only the clients whose appear in both tables. I have been attempting to create a temporary table inserting the data from "Client" and "Transactions" and selecting from that but not successfully yet. But is this the way to go about it. The scale is an anticipated 1000 clients per month of which an anticipated 800 will involve transactions Louise