I have a system that shows records year wise. I have dropdown menu from which user selects year, and I am storing that value in variable $year
. So now when $year = 2013-2014
, it should not display records of year 2014-2015. BTW when I insert my contractNumber, I also insert the year which user has selected during the login. e.g. contractNumber = 1#2013-2014
.
I tried this queries:
SELECT * FROM contract WHERE contarctNumber RLIKE "^$year";
Now when I select year 2014-2015, it still displays all the records from year 2013-2014.
Any suggestions?