-2
$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.

Sloan Thrasher
  • 4,953
  • 3
  • 22
  • 40

1 Answers1

0

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;" ;
Sloan Thrasher
  • 4,953
  • 3
  • 22
  • 40