$sql = "select distinct c.id, c.name, c.projects from tt_user_project_binds upb
inner join tt_client_project_binds cpb on (cpb.project_id = upb.project_id)
inner join tt_clients c on (c.id = cpb.client_id and c.status = 1)
$sql = "select distinct c.id, c.name, c.projects from tt_user_project_binds upb
inner join tt_client_project_binds cpb on (cpb.project_id = upb.project_id)
inner join tt_clients c on (c.id = cpb.client_id and c.status = 1)