Try not mixing left join and comma-joins, and use an INNER JOIN keyword
between "m.manufacturers_id, products_to_categories"
Baron
Federico Giannici wrote:
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.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]