0
$query ="SELECT *
         FROM expiration 
       where 'expirationdate' BETWEEN  (DATE_FORMAT(curdate(),'%m/%d/%Y')) AND  (DATE_FORMAT(curdate()+ INTERVAL 6 MONTH,'%m/%d/%Y'))";

where is the problem

Sammitch
  • 27,459
  • 7
  • 46
  • 75

1 Answers1

1

Column names must be in Backticks see When to use single quotes, double quotes, and backticks in MySQL and as mentioned don't convert the date column

$query ="SELECT *
         FROM expiration 
       where `expirationdate` BETWEEN  curdate() AND  curdate() + INTERVAL 6 MONTH";
nbk
  • 31,930
  • 6
  • 24
  • 40