Dear ricmetal:
OK, this is the code I used based on yours above:
Code:
$dtStart = "2005-08-19";
$dtEnd = "2009-03-09";
$tmStart = strtotime($dtStart);
$tmEnd = strtotime($dtEnd);
for($i=$tmStart; $i<=$tmEnd; $i=$i+86400) {
echo date("Y-m-d", $i)."<br>";
$cdate = date('Y-m-d',$i);
$sql = "SELECT * FROM checks WHERE Ch_Date = '$cdate'";
$result = mysql_query($sql,$connection) or die("Couldn't execute $sql query.");
$Price_Checks = mysql_num_rows($result);
$sql = "INSERT INTO checktots ( `cdate`, `checks` ) VALUES ( '$cdate', '$Price_Checks' ) ";
$result2 = mysql_query($sql,$connection) or die("Couldn't execute $sql query.");
}
It worked... yahoo! Thanks very much, e
Bookmarks