Let’s say I have this MySQL table:

OK.. see the type field? Type 0 is when a person KNOWS and a language and Type 1 is when a person is LEARNING that language.
and let’s say I have some data:

As you can see, member 3 corresponds with uid (user id). User 3 KNOWS Chinese because of the type 0 but where was User 1 is LEARNING Chinese because of the type 1.
And finally, let’s say I make a form. It has two select fields filled with an array of language selections. After a certain submit… $lang_learning outputs zh and $language_know outputs en. How would I find a person who speaks zh and is learning en without conflicting with the language field since you’re essentially looking for it twice?
Thanks.
You need a self join. Try this.