Welcome Doug! I ran a modified version of your SQL locally, and I get results even for those NULL dates. First, first - in real time, convert zero to another value ("convert zero to 0"), you need to use the MySQL IF statement , if you know anything about Oracle, this is very similar to the DECODE command. NULL is automatically evaluated as false, so you can simply write:
SELECT IF(date_created,date_created,0) FROM sometable
Of course ... 0 is no longer a date, but NULL. I found that the DAYNAME function just passes NULL dates for you:
SELECT DAYNAME(date_created) day,COUNT(*) my_count FROM sometable WHERE date_created IS NULL OR (date_created>='2010-10-20 21:02:38' AND date_created <= '2010-10-27 21:02:38') GROUP BY DAY(date_created)
What I get from this (with an example dataset) is 8 day values: 7 days of the week + NULL (with a score). Which view makes sense ... you cannot convert an unknown date to a day of the week.
Perhaps these were your erroneous @ signs in your SQL, if I do not understand your purpose.
UPDATE
Based on your last comment, you need to take on PHP processing. Create an array of days before processing, then add MySQL data to the existing array so that all days are (and in order).
Source : PHP time counting
//You may not even need "date_created IS NULL OR" in the where statement $sql="SELECT DAYNAME(date_created) day,COUNT(*) my_count FROM sometable WHERE date_created IS NULL OR (date_created>='2010-10-20 21:02:38' AND date_created <= '2010-10-27 21:02:38') GROUP BY DAY(date_created)"; //We're assuming you've setup a MySQL connection in $conn $result = @mysql_query($sql, $conn) or die(mysql_error()); //Starting data - Zero for every day $days=array("Sunday"=>0,"Monday"=>0,"Tuesday"=>0,"Wednesday"=>0, "Thursday"=>0,"Friday"=>0,"Saturday"=>0); while($row = mysql_fetch_array($result)) { $days[$row["day"]]+=$row["my_count"]; } mysql_free_result($result); //Preview the output print_r($days);