Re: Re: Problems with INNER JOIN
| From: | Terion Miller | Date: | Thu, 29 Jan 2009 23:21:09 +0000 |
| Subject: | Re: Re: Problems with INNER JOIN | ||
| References: | 1 2 3 4 5 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45918@lists.php.net to get a copy of this message | ||
Yep they both work separately ... can't believe I've been stuck on the same
thing all day, it seems like an easy thing...
On Thu, Jan 29, 2009 at 5:09 PM, Chris <dmagick@gmail.com> wrote:
> Terion Miller wrote:
>
>> Actually I have tried EVERYTHING suggested and it just does not work, in
>> my last query here I put in a user I know has orders and still nothing :
>>
>> $sql3 = "SELECT admin.AdminID, workorders.WorkOrderID,
>> workorders.DATE_FORMAT(CreatedDate,'%m/%e/%y') AS SubmitDate,
>> workorders.Location, workorders.AdminID, workorders.FormName,
>> workorders.Status FROM admin INNER JOIN workorders ON admin.AdminID =
>> workorders.AdminID WHERE admin.username = 'lhanford' ";
>>
>> Are there mySQL settings that could prevent JOINS?
>>
>
> Definitely not.
>
> Try it manually in two parts:
>
> select adminID from admin WHERE username='lhanford';
>
> remember that id, then:
>
> select * from workorders where adminID='admin_id_from_last_result';
>
> Any results?
>
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>