Do as I showed in my first answer:
Any columns that you want to get from table A that are not in table B, you simply use (just making ONE example)
NULL AS edu_level
Note that, in a UNION, *ONLY* the field names given in the *FIRST* SELECT are seen by your PHP code.
So if you did (just another example!)
SELECT studentid, studentName FROM students WHERE ...
SELECT userid, username FROM users WHERE ...
Then in your PHP code (or any other code, for that matter), you would *NOT* be able to do something like
. Again, ONLY the field names from the first SELECT are visible, so it's very important the you use meaningful names in *that* SELECT, even when supplying just NULL values.