Afficher un message
Vieux 29/08/2007, 11h56   #1
Federico Giannici
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Unknown column error after upgrading from 4.0 to 5.0

Since we upgraded from MySQL 4.0 to 5.0 (under OpenBSD 4.1 amd64) the
following command:

select count(*) as total 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 where p.products_status = '1' and p.products_id =
p2c.products_id and pd.products_id = p2c.products_id and pd.language_id
= '1' and p2c.categories_id = '1'

give the following error:

ERROR 1054 (42S22): Unknown column 'p.products_id' in 'on clause'

What's wrong with that command?
And why it worked correctly under 4.0?


I tried to eliminate the aliases and use directly the real tables names
but nothing changed.

Obviously the column exists, the following command works:

select products.products_id from products



Thanks.

--
__________________________________________________ _
__
|- giannici@neomedia.it
|ederico Giannici http://www.neomedia.it
__________________________________________________ _
  Réponse avec citation
 
Page generated in 0,05425 seconds with 9 queries