Jump to content

INNER JOIN and WHERE -- SOLVED


niche
 Share

Recommended Posts

This code produces: Column 'subcategory' in where clause is ambiguous "SELECT * FROM stk INNER JOIN plan ON stk.cliorder=plan.cliorder WHERE subcategory = '" . $keyword . "'" What do you think the problem is?

Edited by niche
  • Like 1
Link to comment
Share on other sites

Just after I posted, I tried: "SELECT * FROM stk INNER JOIN plan ON stk.cliorder=plan.cliorder WHERE stk.subcategory = '" . $keyword . "'" and was successful. This was the first time I've used WHERE with JOIN.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...