I have a listings table, and each listing has column called 'top'. Basically, if top is not null, I want that listing to show up first, then the others.
Right now, my code is like this:
foreach ($results as $result):
echo $result->name;
endforeach;
This will show me everything, but I want the rows with 'top' not null to show up first. What's the best way to go about this?