freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] ODBC, MSSQL, FreeTDS inner join not returning data from second table
- From: Andrew Rousseau <andrew AT bluehousegroup.com>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] ODBC, MSSQL, FreeTDS inner join not returning data from second table
- Date: Tue, 16 Sep 2014 15:07:40 -0400
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?
-
[freetds] ODBC, MSSQL, FreeTDS inner join not returning data from second table,
Andrew Rousseau, 09/16/2014
-
Re: [freetds] ODBC, MSSQL, FreeTDS inner join not returning data from second table,
Andrew Rousseau, 09/16/2014
- Re: [freetds] ODBC, MSSQL, FreeTDS inner join not returning data from second table, Frediano Ziglio, 09/19/2014
-
Re: [freetds] ODBC, MSSQL, FreeTDS inner join not returning data from second table,
Andrew Rousseau, 09/16/2014
Archive powered by MHonArc 2.6.24.