Need help displaying content based on date
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:
Piece of software updated on this date
more example of software
A piece of software
This piece of software
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:
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.
$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());
echo "<div id=\"newestsoftware\" class=\"font\">";
echo trim("<a href=\"pages/singlesoftwarepiece.inc.php?id=$id&name=$name
&category=$category\"/>$name</a>" . "<br>");
Use $row = mssql_fetch_assoc($result) rather than
Knowledge is that which can be shown to be the case, and Intelligence is the method one uses to deploy the demonstration of what is the case, everything else is Information.
For a stronger Text reading try:
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)