I'm trying to use odbc_do with a select statement that uses inner joins.
When I type the Select statement directly into the query window for MSSQL
2000 the query runs fine.
I use the same select statement through odbc
and I get this error: Warning: SQL error: [OpenLink][ODBC][Driver]Syntax
error or access, SQL state 37000 in SQLExecDirect in
/home/httpd/site.somewhere/htdocs/file.php on line 32.
This only happens when I add the inner join on my select statement. If I
don't use a inner join through odbc I can get a connection and a
recordset returned so my connection works fine. I add the inner join and
I get the error. The inner join is joining two tables from the same
database so I'm not even crossing databases.
Here is my select statement: Select Table1.Column1, Table1.Column2 from
Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID;
If I leave out everything after the INNER JOIN the select statement
works. Any help would be much appreciated.
PHP 4.0.4/Apache 1.3.14/Openlink ODBC for
glibc2.1/SQL2000
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]