I'm doing a search between the AirframeHours records..

Why is it that my query allows me to search values below or between the AirframeHours.. but it doesnt allow me to do a search above that value.

That is to say.. user keys in 2000 onto AirframeHours2(the second textfield) and it returns records that are below 2000

But when user keys in 100 onto AirframeHours and it returns no records that are more than 100

if (!empty($_GET['AirFrameHours'])){ 
$queryAircraftDisplay  .= " and AirFrameHours>='".$_GET['AirFrameHours']."' and AirFrameHours <= '".$_GET['AirFrameHours2']."'"; 
}

if (!empty($_GET['AirFrameHours2'])){ 
$queryAircraftDisplay  .= " and AirFrameHours>='".$_GET['AirFrameHours']."' and AirFrameHours <= '".$_GET['AirFrameHours2']."'"; 
}

    What's the value of AirFrameHours2? It won't return anything higher than that.

    (Incidentally, you use both AirFrameHours and AirFrameHours in your queries - which are identical - but you're only testing one of them.)

      Write a Reply...