<?php

$thisid = 19701;

$conn = @mysqli_connect('localhost', 'root', '');
  if (!$conn)
  {
    die("Database Connection Failed" . mysql_error());
  }

  $select_db = mysqli_select_db($conn,'p2');
  if (!$select_db)
  {
    die("Database Selection Failed" . mysql_error());
  }

 $sqlrec = "SELECT * from daily_pay where emp_id=".$thisid." GROUP BY date1";
  $query1  = mysqli_query($conn,$sqlrec);

while($row1=mysqli_fetch_array($query1))
  {


  	echo $row1['emp_id'];

  }

?>