how to Increament date daywise
<p>i have in my database records based on team types.now i need the system to show records of entire team from database based on dates entered i.e if i enter 06-June-2012 to 16-june-2012 it should show me all records from first date to other date. (in php)</p>

<pre><code>$sql="SELECT mstEmp.empname,InDate, dailyattendance.InTime,dailyattendance.OutTime,mstEmp.teamtype FROM mstEmp left join dailyattendance on (dailyattendance.HolderName = mstEmp.empname) where (InDate between '$from' AND '$to') and mstEmp.teamtype='$chk' GROUP BY mstEmp.empname";
$res = mysql_query($sql);

while($row = mysql_fetch_row($res)) {           
  list($name,$indate,$in,$out,$t) = $row;
  if($row[1]==NULL ||$row[2]==NULL || $row[3]==NULL) { 
    $row[3]='NULL' ;
    $row[2]='NULL' ;
  } else {
    $row[2] = date("g:i A", $in);
    $row[3]= date("g:i A" ,$out);
  }
  $d3 = date("d-m-Y (D)", $in);
  $bg = '';
  if(date('D', $in) == 'Sun' || date('D', $in) == 'Sat')
    $bg = 'bgcolor=#EEEEEE';

  echo "&lt;tr $bg&gt;&lt;td colspan=4&gt;Date: ".$d3."&lt;/td&gt;&lt;/tr&gt;";
  if($indate != $date) {
    $date = $indate;
    echo "&lt;tr&gt;";
    echo "&lt;td align=left width='35%'&gt;".trim($name)."&lt;/td&gt;";
    echo "&lt;td align=center width='20%' &gt;".$row[2]."&lt;/td&gt;";
    echo "&lt;td align=center  width='23%' &gt;".$row[3]."&lt;/td&gt;";
    echo "&lt;td align=center width='16%'&gt;".$t."&lt;/td&gt;";
    //echo "&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;";
  }
}
echo "&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;";
echo "&lt;/form&gt;";
</code></pre>
