Using NOT IN?

admin

Administrator
Staff member
I've been using ASP a lot at work recently, and now back in php&mysql, I've got this:

SELECT * FROM category WHERE category_key NOT IN (SELECT category_fkey FROM productcategorylink WHERE product_fkey = 2)

Which says there's an error at the bit in brakets (I'm guessing it doesn't suppose NOT IN?)

Any ideas how I could rewrite that? I think you can probably understand it from the query, but let me know if you don't understand what it's trying to do.

Thanks,

Danny
 
Back
Top