I have two tables: EmployeeInfo Table (table 1) and ItemsInfo Table (table 2):
Table 1:

Table 2:

In the UI screen , I have two DIV layers – the left div and the right div. The left div should load data of items not associated to employee and the right div should load the data associated to the employee.
For example, on page load, for employee with empid=201, the data in both div should be populated like this:

To achieve this, I want the mysql query output to be like this:

that is the returned json objects output to be like this :
[{"empid":"","itemid":"1","items":"Apple"},{"empid":"201","itemid":"2","items":"Banana"},{"empid":"","itemid":"3","items":"Baseball"},{"empid":"","itemid":"4","items":"Bikes"},{"empid":"201","itemid":"5","items":"Blue"}]
So that i can push the data to the appropriate div with getJson method. if empid=null, the data to be pushed in the left div else if the empid=201, the data to be pushed n the right div.
I tried with Left Join but, since in table 1, all the field values are repeated more than once, i dont get the exact query output.
Kindly help me how to achieve the above scenario.. Thanks in advance.
Your question is a bit hard to read with all the UI stuff you’re throwing in. To get your requested query output do: