Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3983772
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:41:21+00:00 2026-05-20T05:41:21+00:00

I have this database with a table and a row called ‘rank’. In that

  • 0

I have this database with a table and a row called ‘rank’.

In that database table there are 2 teams. Each Get ranked every day.

Ex.

Day 1.

Team F – rank =1
Team R – rank =2

Day 2.

Team R – rank =1
Team F – rank =2


So i want the teams to appear on top because of their higher rank

Right now I got this: (appear as entered)-while($person = mysql_fetch_array($result)) {

So what do I put in that code in order to make it be the highest value of a column.

any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:41:22+00:00Added an answer on May 20, 2026 at 5:41 am

    Could you be more specific about your table layout? Maybe provide the CREATE TABLE SQL that was used to create it?

    To order results by value, you can end a sql query with ORDER BY column_name DESC in order to get the results returned in MAX -> MIN order of that column. You can replace DESC with ASC to get it to go in MIN -> MAX order. If you don’t put DESC or ASC it defaults to one of them, but I forget which.

    If you want to sort on more than one column, put them in the ORDER BY as comma separated. So ORDER BY column1, column2 DESC will produce a listing that is ordered from the greatest value of column1 to the least value, and anytime the values of column1 are identical between rows, it will orders those by column2.

    If I read your question correctly, and you in fact have a “row” named rank, then something is wrong with your table structure, as you can’t really name “rows” (and SQL generally refers to rows as records, anyway).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table called pano_raw that has 3 columns lat, lng, and latlng.
I've created a page that lists information in a table, this information comes from
i have this designing my table: <style type=text/css> tr { background: <?php echo $colors[$status];?>;
I'm using apache, php, mysql and code igniter and I have a database set
I'm using WatiN to parse my web site. I have a button that starts
hi so this is the setup: i need to update some prices from a
I just got into somewhat complex databases (complex for me) and I have been
Here's what I'm trying to do. I have an extremely large list of items.
Hi i am going to store data into a local .db in my android
I am trying to set up a simple hit counter within expression engine using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.