Re: Inner Joins
| From: | Larry Forrister | Date: | Fri, 12 Jan 2001 08:42:44 +0000 |
| Subject: | Re: Inner Joins | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4942@lists.php.net to get a copy of this message | ||
The INNER JOIN condition is not allowed in mySQL prior to version 3.23.16.
Just put the test "tbl_cip.FormID = tbl_formid.FormID" in the WHERE clause.
~~LF
"samsom, debra" wrote:
> I am writing some PHP code with calls to Mysql. I am trying to do a
> Inner
> join and I am not getting any results back from my query (and no
> errors).
> If I cut the Inner join out of the SQL statement it works.
>
> If I link the MySql tables into Microsoft Access and run the exact SQL
> statement it works with the correct results.
>
> Is there any special syntax that PHP requires for inner joins? I'm
> running
> PHP 3.0.11 and Mysql 3.22.34 on NT 4.0 with Apache (of course).
>
> 'SELECT tbl_cip.CIP, tbl_cip.Originator, tbl_cip.Coordinator,
> tbl_cip.AproveCancel,
> tbl_cip.Actionees, tbl_cip.Director, tbl_cip.Repeat,
> tbl_cip.HoldPending,
> tbl_cip.Auditor, tbl_cip.Verifier, tbl_cip.Date
> FROM tbl_cip
> INNER JOIN tbl_formid ON tbl_cip.FormID =
> tbl_formid.FormID';
>
> Debra Samsom
> Bristol Aerospace Ltd.
> (204) 775-8331 3402
> dsamsom@bristol.ca
--
--------------------------------------------
Short people don't need shrinks.