Hi Kim,
Kim Christensen wrote:
The error I get while trying executing is "Unknown column
'products.product_id' in 'on clause'. Since I am selecting all
columns from that table (products), I can't really see why there's a
fuss about it!
I'm thankful for every tip I can get, and please let me know if you want
to see the table layouts.
Wow, that's a huge query. I think the problems are the subselects in the
select clause:
SELECT i.supplier_id FROM products.items_new i
JOIN products.item_status ON (item_status.product_id =
products.product_id && item_status.supplier_id = i.supplier_id &&
item_status.group_id = 1)
WHERE i.product_id = products.product_id && i.item_stock > 0
the field products.product_id is not defined at this place, because the
subquery is specified in the field list and not joined upon. So you have
to add products to the from clause.
regards
Nils
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]