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
46 Jones Inc.
54 Baker Inc.


I have another table called projects, that looks like this:

id | company_id | status
1 46 Active
2 54 Inactive


In this case, it is relational in that company_id is the key to the clients table, for naming purposes. My question is, is it possible to do a query across two tables that could retrieve all of the information in the projects table AND have the 'company' field in the clients table come up as well. So it would be like this:

id | company_id | status | company
1 46 Active Jones Inc.
2 54 Inactive Baker Inc.

any help would be greatly appreciated...

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

Reply via email to