$sql= 'select employee.id AS ID,CONCAT(employee.fname," ",employee.lname) AS Name, IF(loan.status= "unpaid",loan.installment,0) AS Loan where employee.user = "$name"';
This doesn't show the result from the table. because this query is showing no match . I think putting "$name" in double quote is the error.
$sql= "select employee.id AS ID,CONCAT(employee.fname," ",employee.lname) AS Name, IF(loan.status= 'unpaid',loan.installment,0) AS Loan where employee.user = '$name'"
in this case putting 'unpaid' in single quote doesn't show result for this column
i tried employee.user = ''' $name''' employee.user = "'$name'" none of these work.. please help