php-db | 2001072
Date: 07/30/01
- Next message: Andrew Hill: "RE: [PHP-DB] ODBC and PHP"
- Previous message: Hugh Bothwell: "[PHP-DB] Re: Query displays one"
- In reply to: Steve Fitzgerald: "[PHP-DB] A Join Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Steve Fitzgerald" <sf <email protected>> wrote in message
news:20010730141456.85883.qmail <email protected>
> I'm trying to create a join statement that pulls out a CompanyName based
> on a given CompanyID that is tied to a specified ContactID.
>
> For example, if ContactID=1 then the corresponding CompanyName might be
> Smith, Inc. depending on what was entered.
SELECT
CompanyName
FROM
Company
INNER JOIN
Contacts
ON
Company.CompanyID = Contacts.CompanyID
WHERE
ContactID=$ContactID
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrew Hill: "RE: [PHP-DB] ODBC and PHP"
- Previous message: Hugh Bothwell: "[PHP-DB] Re: Query displays one"
- In reply to: Steve Fitzgerald: "[PHP-DB] A Join Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

