php Query problem, dunno how to call it :s
Posted: Wed Aug 11, 2004 6:00 am
Hi evrybody!
Is there a way that i can make a 'where blahblah = annything query'? If you get what i mean.
For example:
this way, i select everything where active = 1 and genre1 = $genre or genre2 = $genre
this i what i think it should be, but doesn't work.
Select everything where active = 1 and genre1 = (annything) or subgenre = (annything)
I hope there is a way to do it, would be very helpfull.
Is there a way that i can make a 'where blahblah = annything query'? If you get what i mean.
For example:
this way, i select everything where active = 1 and genre1 = $genre or genre2 = $genre
Code: Select all
$query = "SELECT * FROM bands WHERE active = 1 AND genre1 = '$genre' OR genre2 = '$genre'";this i what i think it should be, but doesn't work.
Select everything where active = 1 and genre1 = (annything) or subgenre = (annything)
Code: Select all
... WHERE active = 1 AND genre1 = * OR genre2 = * ";I hope there is a way to do it, would be very helpfull.