Re: join query/relational database question
| From: | Rick Widmer | Date: | Mon, 06 Jan 2003 23:05:53 +0000 |
| Subject: | Re: join query/relational database question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-24606@lists.php.net to get a copy of this message | ||
At 04:09 PM 1/6/03 -0500, Doug Parker wrote:
I have a relational database issue that I'll simplify for the sake of this post. I have one table, called clients, that has an id and the company name. For example: id | company -----------------------SELECT id, company.company_id, status, company FROM projects LEFT JOIN Companies USING( company_id ) ORDER BY company Rick46 Jones Inc. 54 Baker Inc.etc. I have another table called projects, that looks like this: id | company_id | status -----------------------------------------------1 46 Active 2 54 Inactiveid | company_id | status | company------------------------------------------------------------------------1 46 Active Jones Inc. 2 54 Inactive Baker Inc.