ODBC, MSSQL, FreeTDS inner join not returning data from second table

Andrew Rousseau <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAKkeNjXttCC8F9q7ebu9Su-Maje=WKObBK0YPsZpdivoTriTkg@mail.gmail.com>
I have FreeTDS installed on an Ubuntu 14.04 server. I am connecting to the
MSSQL database as follows:

$db = new PDO('odbc:Driver=FreeTDS; Server=<IP Address>; Port=1433;
Database=db_name; UID=user; PWD=password;');

I am running the following query:

SELECT c.*, ct.*
FROM Committee AS c
INNER JOIN CommitteeType as ct on c.CommitteeTypeID=ct.CommitteeTypeID
WHERE CommitteeID=$committee_id

Then I am running:

$statement = $db->prepare($query);
$statement->execute();
$result = $statement->fetchAll(PDO::FETCH_NAMED);

The resulting array is very much what would be expected except that the
values from the CommitteeType table are all empty. When I run the exact
same query in Navicat on the database I get values for everything from the
second table.

Is there something buggy about this driver?

I have tried many variations on the query syntax without any difference in
output. It appears that I can never get values from an inner joined table
regardless of which tables I am querying.

Anyone see anything I am missing or have experienced anything similar?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.