Answered
Sorting requested data
I want to add a sorting function to my query. I am able to
pull all of the data or a selection of the data I have, however
when I add in the "ORDER BY date DESC" it does not work for the
first of my "else" function. To be more clear:
1. line 5 "SELECT * FROM Listings ORDER BY date DESC, does work
2. line 3 "SELECT * FROM Listings WHERE state = %s ORDER BY date DESC" does NOT work
In line 3 the %s is standing in for what the DW search page sends to the database (that would be a state code, ie. CO, NM, PA).
Do you know how to add in the sort function so that it works?
Thank you very much for your time!
Sead1
1. line 5 "SELECT * FROM Listings ORDER BY date DESC, does work
2. line 3 "SELECT * FROM Listings WHERE state = %s ORDER BY date DESC" does NOT work
In line 3 the %s is standing in for what the DW search page sends to the database (that would be a state code, ie. CO, NM, PA).
Do you know how to add in the sort function so that it works?
Thank you very much for your time!
Sead1
