asearching between 2 dates
Hi,
I have a table that had car parts. There are 2 columns First_Year and Last_Year. These are the dates for the model years a part is availabel for. I have a date drop down, that can be picked from, so if you pick, Modl = Mustang GT, Year = 1997, I need to get all of the parts for the models that the year includes 1997. It could be the engine is 1995 to 1998.
I have tired this:
$WADbSearch1->addComparison("IDModel_new","".((isset($_POST["model"]))?$_POST["model"]:"") ."","AND","=",1);
$WADbSearch1->addComparison("FirstYear_new","".((isset($_POST["year"]))?$_POST["year"]:"") ."","AND",">=",1);
$WADbSearch1->addComparison("LastYear_new","".((isset($_POST["year"]))?$_POST["year"]:"") ."","AND","<=",1);
And I have tried hand coding using BETWEEN.
Any helpful hints?
larry