3 Replies Latest reply on Nov 5, 2013 8:27 AM by philmodjunk

    ExecuteSQL does not return any value.



      ExecuteSQL does not return any value.


           Hi All,
           I have tables: Tasks(_kp_task_id, status) and Staffs(_kp_staff_id, status). One Staff can work on multi tasks and if the last tasks's status is Delivery that's mean the status of the staff is free.
           I design one layout  to show all staff and their status base on their last Tasks. But when I write calculation for the staff status column as:
           $task_id = Max( Tasks::_kp_task_id);
           $status = ExecuteSQL ( "Select Tasks::status from Tasks where Tasks::_kp_task_id = ?" ; "" ; ""; $task_id );
           If($status ="Delivery","Free","Working")
           It returns nothing. Please show me the reason why. It is seemly wrong on the ExecuteSQL, Why?