I wrote a programm that automatically writes new entries to a database as soon as new articles are available through an RSS-Feed. It takes the title, date, etc. of that article and writes these informations in the database as a new entry. I also run a code that displays the most recent entries of the database to my website. All of this worked until the date changed to 2015. It orders the entries by month and day, but seems to ignore the year. So the new entries end up at the bottom of the list as I started this programm in october 2014.
Here is the query I use to select the entries:
$res = $db -> query('SELECT * FROM himate ORDER BY Recent DESC Limit 20');
And here is a pic of how the database seems to look when ordered by the date of the entries (note: the entries are ordered from top to bottom, so the new entries should be at the bottom):
I have the feeling that it has something to do with the time format that I get from the RSS-Feed, but as there are already many entries in the database and I have no influence to the format I receive through the feed, I would be relieved if there was a way to fix this without making changes to the time format.
Any help would be greatly appreciated!
Aucun commentaire:
Enregistrer un commentaire