Hey all,
I am having trouble with a php script used to show results to a mySQL query. I am using the following query:
SELECT * FROM files WHERE name LIKE '%$searchTerm%' ORDER BY date DESC
where date is stored in the database in the form "date("m / d / y")"
up till now (for the past six months), I have had no problems with this script, but since january started, new files appear at the very end of the list of files, as opposed to the beginning where they should be.
I am not sure whether the problem rests with my SQL query, or with my date format or what.
Thanks for any help
edit: I have tested a few things, and it seems that the db is sorting the results by the month. that is, if i change one of the dates from 01/18/07 to 11/18/07, it appears along with all the other November entries (from 2006).