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
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.
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
$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]
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.
Social Networking Bookmarks