SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Formerly known as RockNRollPig Shpigford's Avatar
    Join Date
    Dec 2002
    Location
    Denver, CO
    Posts
    2,877
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question how do i filter query results from a database?

    each item in my database has the field "genre" and i want return results that only have the word "adventure" in the "genre" field....how would i do that in my query?

  2. #2
    SitePoint Wizard Lats's Avatar
    Join Date
    Jun 2003
    Location
    Melbourne, AU
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something like...
    PHP Code:
    $lookfor "adventure";
    $sql mysql_query("SELECT * FROM table WHERE genre LIKE '$lookfor' "); 
    Lats...

  3. #3
    Formerly known as RockNRollPig Shpigford's Avatar
    Join Date
    Dec 2002
    Location
    Denver, CO
    Posts
    2,877
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    rock...that worked perfect


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
  •