First, define "not work" -- error, or no results?
Second, you'd benefit from proper JOIN syntax using ON clauses; easier on the eye & the parser, since it keeps the join conditions separate from the where clause:
$statement = "SELECT * FROM device
INNER JOIN device_eo ON ( device.device_id = device_eo.device_id )
INNER JOIN eo ON ( device_eo.executive_order = eo.executive_order )
INNER JOIN eo_engine_family ON ( eo.executive_order = eo_engine_family.executive_order )
INNER JOIN engine_family ON ( eo_engine_family.engine_family_name = engine_family.engine_family_name )
WHERE engine_family.engine_year ='".mysql_real_escape_string($year)."'
AND engine_family.displacement ='".mysql_real_escape_string($disp)."'
AND engine_family.engine_mfr ='".mysql_real_escape_string($mfr)."' ".$order."";
But can I see the valued of $statement in both cases?