Link to home
Start Free TrialLog in
Avatar of mobileuni
mobileuni

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial