I have one problem.I am fetching some data from MYSQL table.But there are some duplicate datas. I need to skip those duplicate data.I am explaining my code below.

```
session_start();
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$colg_id=1;
$dept_id = $_SESSION["admin_dept_id"];
$user_id=$_SESSION["admin_id"];
$connect = mysqli_connect("localhost", "root", "******", "go_fasto");
$result = mysqli_query($connect, "select plan_id,unit_name  from db_unit_plan where dept_id='".$dept_id."'  and user_id = '".$user_id."'   ");
while ($row =mysqli_fetch_assoc($result)) {
  $data[] = $row;
}
    print json_encode($data);

```

Here i need if any unit\_name column has same type data then how to skip those rows.Please help me.