-1
$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
  • 30,782
  • 7
  • 50
  • 77

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
  • 45,398
  • 8
  • 30
  • 47