I need assistance with my effort in trying to query and then display information from a database. Here is what I am trying to accomplish:

2013-03-03
Piece of software updated on this date
Updated software
more example of software
software

2011-03-18
A piece of software
This piece of software
Something else

2011-07-20
Here is some software
A new piece of software

As you can see I am trying to result the display in showing the date of release and then if any software was updated on that date, to list any software with that release date.

In my database, I have the following structure:

id
name
version
link
description
dateadded
category

Here is my code as I have it now. I have tried various while loops or if...then loops and I can't seem to figure this one out. Any help is greatly appreciated.



Code:
$dbc=mysql_connect ($db_hostname, $db_username, $db_pass, $db_name) or die ('I am unable to connect to the database because of: ' . mysql_error());
			mysql_select_db("tuxandp1_linux", $dbc) or die ('I am unable to find that db.');

    			$query=("SELECT * FROM software ORDER BY dateadded DESC LIMIT 7");
			    $result=mysql_query($query) or die('Sorry, could not get software at this time '.mysql_error());
				while($row=mysql_fetch_array($result))  {

					$id=trim($row['id']);
					$name=trim($row['name']);
					$version=trim($row['version']);
					$link=trim($row['link']);
					$description=trim($row['description']);
					$dateadded=trim($row['dateadded']);
					$category=trim($row['category']);
						echo"$dateadded";
						echo "<div id=\"newestsoftware\" class=\"font\">";
    					echo trim("<a href=\"pages/singlesoftwarepiece.inc.php?id=$id&name=$name
    					&version=$version&url=$link&description=$description&dateadded=$dateadded
    					&category=$category\"/>$name</a>" . "<br>");
						echo "</div>";
			}
					    echo "<br>";

thanks,
Randy