Select specific letter in row of a table?

Discussion in 'PHP' started by wvccboy, Feb 16, 2008.

  1. #1
    What I have inside one of my rows in my table is a specific ID.

    Now what I have is some PHP code to specifically sort the ID and display something when something has the specific ID.

    All I need is how can I use mysql_query to select a letter (sort by letter) and do that code when that letter is returned?

    Something like $sql = "SELECT * FROM `row`";

    except it selects the ID "A" from the entire row and does the action from that.

    Thanks
     
    wvccboy, Feb 16, 2008 IP
  2. aaron_nimocks

    aaron_nimocks Im kind of a big deal Staff

    Messages:
    5,563
    Likes Received:
    627
    Best Answers:
    0
    Trophy Points:
    420
    #2
    Talking something like?

    $sql = "SELECT * FROM `row` WHERE ID=`a`";
    PHP:
     
    aaron_nimocks, Feb 16, 2008 IP
    wvccboy likes this.
  3. wvccboy

    wvccboy Notable Member

    Messages:
    2,632
    Likes Received:
    81
    Best Answers:
    1
    Trophy Points:
    250
    #3
    Ah yes. That's exactly it.

    Thanks!
     
    wvccboy, Feb 16, 2008 IP