I created a website that uses a database to search results, however I just imported new results and noticed that these results are not being displayed in alphabetical order as they should be.
Here’s the query I’m using:
SELECT * FROM songdb WHERE artist LIKE ‘%$q%’ OR (artist AND title LIKE ‘%$q%’) OR title like ‘%$q%’ ORDER BY title ASC LIMIT $startrow, 10
It displays all of the results, but it is putting the new records at the end, instead of where they should be alphabetically, I’m stumped.
Any help is appreciated.