$sql = "SELECT *
FROM listing
WHERE (MATCH(dir_heading)
AGAINST ('$wtfld' IN BOOLEAN MODE)) AND busns_suburb LIKE '%".$whrfld."%' " ;
I want to add ORDER BY
to this code but I can't implement it correctly.
$sql = "SELECT *
FROM listing
WHERE (MATCH(dir_heading)
AGAINST ('$wtfld' IN BOOLEAN MODE)) AND busns_suburb LIKE '%".$whrfld."%' " ;
I want to add ORDER BY
to this code but I can't implement it correctly.
As mentioned in my comment above, add the order by following the where clause:
$sql = "SELECT *
FROM listing
WHERE (MATCH(dir_heading)
AGAINST ('$wtfld' IN BOOLEAN MODE)) AND busns_suburb LIKE '%".$whrfld."%'
ORDER BY busns_name;" ;