I need the riposte in layman's language.
SELECT
t1.*
, IF(isBranch='true','',IF(pointsweightage IS NULL,'Not Set',pointsweightage)) AS w
, t2.id AS wid
FROM
`skills_hierarchy` t1 LEFT JOIN
weightage t2 ON t1.pointsweightage=t2.weightage
WHERE
isBranch='false'
AND t1.deptid=$deptid
AND t2.deptid=$deptid
I want the Query to be changed such that it gets me the data of the department which it does login.