mysql if conditional help

help me write a query for mysql

i have a db with exp date

i want it to show only equal or above the current month and year

i tried below :
let say
curmonth : 05
curyear : 2011

query :
select * from members where expire_month >=  curmonth and expire_year >= curyear order by asc

but its skipping month 01 even the year is 2013

assist me with the right way for this query
mobileuniAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
select * from members where ( expire_month >=  curmonth and expire_year = curyear ) OR expire_year > curyear order by asc

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.