Consider the following query:
//$fix and $limit are dynamic values
$query="SELECT ICAO_Ident AS ID, Location_Identifier AS LocID, Official_Facility_Name AS Name, Landing_Facility_Type AS AptType, Associated_State_Post_Office_Code AS State, Associated_City_Name AS City FROM APT WHERE `Location_Identifier` LIKE '%$fix%' OR `ICAO_Ident` LIKE '%$fix%' OR `Official_Facility_Name` LIKE '%$fix%' OR `Associated_City_Name` LIKE '%$fix%' ORDER BY `ICAO_Ident` LIMIT ".$limit."";
I would like to list the results that matched ICAO_Ident
first, then Location_Identifier
, then Official_Facility_Name
, then Associated_City_Name
. I've tried using sort, but sort alone doesn't give priority to a given column. I could use multiple queries, but I'd like to do it in one. Is there a way to do this in a single query?