Help Me Select By Letter PHP/SQL PWEASE!

Discussion in 'PHP' started by scottlpool2003, Sep 2, 2009.

  1. #1
    Hey guys, having a bit of trouble. I'm making a music lyrics website and I have an A-Z bar at the top of the website.

    Trouble is, I'm a little confused on how to code it.

    I'm not an amazing PHP coder so bare with me.

    I decided to just add a field in the database called 'artistletter'

    But I'm properly unsure how to code it.

    Please help! I've looked everywhere but nobody seems to have it :(
     
    scottlpool2003, Sep 2, 2009 IP
  2. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just do WHERE artist_name LIKE "' . mysql_real_escape_string($_GET['letter']) . '%"
     
    premiumscripts, Sep 2, 2009 IP
  3. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #3
    Ahhh yeah silly me, basic search :p Thanks.
     
    scottlpool2003, Sep 2, 2009 IP