i have a table loans in a database with the schema that like this
loans
-----
period (vchar) ' but it contains number string
date
amt
user
i needed to select all the records from a loans where the the date + period is equal to or greater than current date. when i execute the query below
SELECT *
FROM loans
WHERE DATE( DATE_ADD( DATE, INTERVAL period
DAY ) ) >= CURRENT_DATE
LIMIT 0 , 30
i get all the records in the loans table. what is the problem?
periodvalues look like.pay_periodintended asperiod? Are they different columns or is one a typo here?