Afficher un message
Vieux 24/04/2006, 20h22   #2
Bill Karwin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how this query should be in mysql 5

daniel.czestki@wp.pl wrote:
> from
> products_description pd, products p
> left join manufacturers m on p.manufacturers_id = m.manufacturers_id,
> products_to_categories p2c left join specials s on p.products_id =
> s.products_id


> how change it to mysql 5 ??


They changed the rules of order of evaluation in FROM clauses in MySQL5,
to bring the semantics closer to the ANSI standard SQL.

You can solve this by using parentheses, or you can use SQL-92 JOIN
syntax throughout. For example:

FROM
products p
JOIN products_to_categories p2c ON p.products_id = p2c.product_id
JOIN products_description pd ON p2c.products_id = pd.products_id
LEFT JOIN manufacturers m ON p.manufacturers_id = m.manufacturers_id
LEFT JOIN specials s ON p.products_id = s.products_id

Regards,
Bill K.
  Réponse avec citation
 
Page generated in 0,05030 seconds with 9 queries