$sql = "select id from tt_tasks where team_id = $user->team_id and name = ".
$mdb2->quote($task_name)." and (status = 1 or status = 0)";
$sql = "select id from tt_tasks where team_id = $user->team_id and name = ".
$mdb2->quote($task_name)." and (status = 1 or status = 0)";