All pastes #623005 Raw Edit

Mine

public text v1 · immutable
#623005 ·published 2007-07-17 08:28 UTC
rendered paste body
SELECT * FROM ranks WHERE rank_min <= '10' AND rank_special = '0' ORDER BY rank_min DESC LIMIT 1

returns no results

however

SELECT * FROM ranks WHERE rank_special = '0' ORDER BY rank_min DESC

returns all 5 ranks = 0. 

SELECT * FROM ranks WHERE rank_min <= '23' ORDER BY rank_min DESC LIMIT 1

returns the row where rank_min is closest to 23.

why when i combine them they dont work?+