SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: query

  1. #1
    Non-Member MrLister's Avatar
    Join Date
    Feb 2001
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    query

    here's what i have currently
    PHP Code:
    $result mysql_query("select cheat_name, cheat_id, cheat_text, cheat_cat from cheats_pc"); 
    at the end of from cheats_pc i want to add something so it only selects all where cheat_name starts with a and it does it in alphabetical order.

  2. #2
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Newcastle, England
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    select cheat_name, cheat_id, cheat_text, cheat_cat from cheats_pc where cheat_name like 'a%' order by cheat_name asc
    (I think that's the right syntax, don't shoot me if it's not...)

  3. #3
    Non-Member MrLister's Avatar
    Join Date
    Feb 2001
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup that worked. thank you!

  4. #4
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Newcastle, England
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem


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
  •