Here is what I've got now. I thought it would be easier to do all the date calculations in PHP and then just put them into the query statement but its not working and this is the error I get
"Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource "
From this code
function view_admin_Cal()
{
for ($i = 0; $i < 12; $i++)
{
$month_txt = date("F", mktime(0,0,0,date("m")+$i,date("d"),date("Y")));
$from_date = date("Y-m-d H:i:s", mktime(0,0,0,date("m")+$i,01,date("Y")));
echo "From ".$from_date;
$to_date = date("Y-m-d H:i:s", mktime(23,59,59,date("m")+$i+1,00,date("Y")));
echo " To ".$to_date."<br>";
echo "<b>".$month_txt."</b><br>";
$query = "SELECT *,DATE_FORMAT(dateEntry, '%a, %l%p') as FormatedDate FROM calendar WHERE dateEntry >= ".$from_date." AND dateEntry <= ".$to_date;
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo "<table width='350' border='0' cellspacing='0' cellpadding='4'>";