php sorting based on the column values

Discussion in 'PHP' started by kumar84, Jun 20, 2007.

  1. #1
    I need a php sorting coding

    (ie) how to sort a table based on the column values

    i want to sort table based on 'comapany name' column's values.
     
    kumar84, Jun 20, 2007 IP
  2. dvd871

    dvd871 Guest

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You do that with a mySQL query:

    $sql = mysql_query("SELECT * FROM {table name here} ORDER BY company_name ASC");
     
    dvd871, Jun 20, 2007 IP