How to show a column name just once?

Discussion in 'PHP' started by 123GoToAndPlay, Feb 16, 2008.

  1. #1
    Hi all,

    I have a table like
    id | name | descr | sort

    and i want to display the sort value just once.

    
    SELECT name, descr, sort,  sort as title FROM tbl ORDER BY sort;
    
    Code (markup):
    any tips?
     
    123GoToAndPlay, Feb 16, 2008 IP
  2. nelse

    nelse Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Remove one sort from query.

    SELECT name, descr, sort as title FROM tbl ORDER BY sort;
    Code (markup):
    or
    SELECT name, descr, sort FROM tbl ORDER BY sort;
    Code (markup):
     
    nelse, Feb 16, 2008 IP