I’ve a table like this
days discount
3 5.00
7 10.00
10 15.00
Up to 3 day discount price is Rs 5. 4 to 7 price is Rs 10 and so on… I’ve total no of days.If no of days is < 4 then get 5.00 . if no of days 4 to 7 then get 10.How can I write condition in sql query
SELECT discount FROM mytable WHERE days > XXXX LIMIT 1where XXX is the number of days you want.