PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?PHP if ($row_GetTrainers['inCounty'] != $row_DisplayLocation['location'])
echo '- services this County.' ;?>
<?PHP if ($row_GetTrainers['inCounty'] == $row_DisplayLocation['location'])
echo '<span class="location">'.'- lives in this County.'.'</span>' ;?>
What I need is to have any of the specific names with - lives in this County to come up first on the page. Basically I need to run something like ‘ORDER BY’ however I don’t seem to be able to do this within the constraints of the code above. Is it possible to add something to the script above so that if any of the names are returned from the database in red they will come up listed first on the page. If you check out other locations you will see a little more of what I mean.
Thanks for any help and if necessary I can post more code.
Many thanks
Brian
Quick solution would be to add a column to your database called lives. Enter a number in the column where if they live in the county its '1' if they service the county its '2' then 'ORDER BY' lives either ascending or descending depending on what you want.