WordPress.org

Ready to get started?Download WordPress

Forums

Importing csv table into database - sort order changes? (2 posts)

  1. harvest101
    Member
    Posted 1 year ago #

    Hi,
    I am importing a table into my database via phpMyAdmin, the table populates a couple of dropdowns on my site.

    For some reason even though the table is in the correct order in csv/excel format, once it is imported the order changes, so the order of the list on the dropdowns on my website is wrong (it should be alphabetical).

    I can't see any logic in the way the table is re-sorting itself on import, I import it alphabetically descending, once imported the top 5 or so are sorted ascending (correct), and the next ones are in a random order. How can I make it import the table in a specific order?

  2. fonglh
    Member
    Posted 1 year ago #

    This isn't a WordPress question.

    Anyway you can always use SQL to order the list when you make the query.

Topic Closed

This topic has been closed to new replies.

About this Topic