SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need assistance with ORDER by

    Below is the current sql select statement . I would like to order these results in my own custom order but can not figure out the sql sentence. Any help would be very much appreciaited. For example I want what appears in the 2nd to last row of table "team" to display first and so on. Thank you in advance.

    PHP Code:
    <?php
        
    //Grab Content from DB
        
    $management = @mysql_query('SELECT name, position, bio, image from team where class=2');
        if (!
    management) {
            exit(
    '<p> Error retrieving content from DB please email upde@michaelupdegraff.com with error: ' .
            
    mysql_error() . '</p>');
            }
            
        while (
    $display mysql_fetch_array($management)) {
        
    $name $display['name'];
        
    $position $display['position'];
        
    $image $display['image'];
        
    $bio $display['bio'];
        
        
        
    //Display Instructors
        
    echo "$image
        <h3>
    $name</h3>
        <p><strong>
    $position</strong></p>
        <p>
    $bio</p><div class=\"clearer\"></div> " ;
        }
        
    mysql_close();
        
    ?>

  2. #2
    Non-Member l0t3k's Avatar
    Join Date
    Feb 2005
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey dude sir!!

    u just do 'order by name', 'order by bio', etc....!!!!!

  3. #3
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HI l0t3k

    THank you I was thinking a much more invlolved sentence, LOL. THank you very much.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •