Hello and thanks agian for reading my question.

I have an data base of countries and query it using ORDER BY Name

Now that I have the array in Alapha Order I could like to take say the top 3 or 4 countries that use the data base and have them come up first.

Most of the time I take the array and dump it into select options list like anyone would probably do.

so any idea's on how to do this, I'm just kind stuck on how to approach

    You could add a column to your country database just for sorting purposes. It could be a TINYINT column with a default of 0, and then for those countries that you want to sort to the top of the list, assign a positive value. Then your query might be something like:

    SELECT name FROM countries ORDER BY sort_col DESC, name ASC
    

    (This example assumes the new column is called "sort_col".)

      Ha....I was thinking all this complicated PHP array sorting things and that is a great idea....thanks a bunch

        Write a Reply...