Re: mysql problem in a php book

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My bad -- I visually parsed that as part of the SQL statement.
--
Joe

On Aug 10, 2009, at 5:12 PM, Pete wrote:

> Hey, Joe, as I read the original, I thought, great, we have all the
> details we need for once... <G>
>
> He did say
> >> Message d'erreur : Unknown column 'a.type_id' in 'on clause'
>
> 1) You have create_date rather than creation_date
> 2) The tables are in the wrong order for a JOIN - in the FROM  
> section, I
> have swapped a c for c a
>
> SELECT
> a.name,
> a.type_id,
> b.title,
> b.description,
> b.content_date,
> b.creation_date,
> b.created_by,
> b.last_upd_date,
> b.last_upd_by,
> c.name as dept_name,
> content_id
> FROM Department c,
> Content_Type a
> LEFT OUTER JOIN Content b
> on a.type_id = b.content_type
> and a.type_id = b.content_type
> and b.dept_id = 3
> and b.content_type = 4
> WHERE c.dept_id = 3
> ORDER BY content_date DESC
>
> And I get 4 records returned.
>
> They may not be the right ones, but...
> -- 
> Pete Clark
>
> Hot Costa - Local Spain
> http://www.hotcosta.com
> 



[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux