Close

Results 1 to 4 of 4
  1. #1
    DF VIP Member God is a DJ's Avatar
    Join Date
    Feb 2002
    Location
    Birmingham
    Posts
    2,337
    Thanks
    0
    Thanked:        0
    Karma Level
    370

    Default quick sql question

    take the following query:

    select * from item where itemgenre = '$itemgenre';

    what does the $ do? is it something to do with an input from a form from a website, or have i completely got the wrong idea?

    cheers,
    DJ
    I was touched by Jesus, so i had him arrested.

  2. #2
    DF VIP Member copey123's Avatar
    Join Date
    Nov 2001
    Location
    West Yorkshire
    Posts
    973
    Thanks
    6
    Thanked:        2
    Karma Level
    321

    Default Re: quick sql question

    It's a parameter yes. So basically '$itemgenre' could be the value of what a user selects on the webform if they click "Comedy" for example (If it was a film website).

    PS: Saturday Night, SQL......... explain?!
    LEEDS AND PROUD

  3. #3
    DF Probation Fusen's Avatar
    Join Date
    Mar 2004
    Location
    Kent Uni
    Posts
    3,672
    Thanks
    0
    Thanked:        0
    Karma Level
    565

    Default Re: quick sql question

    $itemgenre is a varible so whatever $itemgenre is set as then thats what will be searched for so

    $itemgrenre = "Horror";

    SELECT * FROM 'books' WHERE 'genre' = "$itemgenre"

    would search for everything in books where the genre was horror
    [CENTER][FONT=Verdana][SIZE=2]Real pirates don't [I]STEAL[/I], they [/SIZE][/FONT][B][FONT=Verdana][SIZE=2]SHARE[/SIZE][/FONT]
    [/B][SIZE=1]Unless they are cunts, then they just leech...:happy:[/SIZE][/CENTER]

  4. #4
    DF VIP Member God is a DJ's Avatar
    Join Date
    Feb 2002
    Location
    Birmingham
    Posts
    2,337
    Thanks
    0
    Thanked:        0
    Karma Level
    370

    Default Re: quick sql question

    cheers boys

    sql on a sat nite because im a comp sci student who is too lazy to work when i should. To add insult to injury, i just got a phone call from my bro asking me to pick him up from the club hes at

    DJ
    I was touched by Jesus, so i had him arrested.

Similar Threads

  1. quick release keys
    By ghostman78 in forum Radio Decoding
    Replies: 2
    Last Post: 6th October 2002, 04:18 AM
  2. redirect question
    By Psychoschiz in forum Web Hosting & Domain Names
    Replies: 2
    Last Post: 26th September 2002, 04:09 PM
  3. Quick Saturn question
    By doughboy in forum Old Skool Gaming & Retro
    Replies: 1
    Last Post: 16th September 2002, 02:19 AM
  4. Quick questionon old consoles
    By bozza in forum Old Skool Gaming & Retro
    Replies: 3
    Last Post: 4th September 2002, 02:25 PM
  5. Where can I get microfilters cheap and quick???
    By furryboo in forum Internet Connections & VPNs
    Replies: 4
    Last Post: 28th August 2002, 02:38 PM

Social Networking 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
  •