...

View Full Version : 2 WHERE declarations?



Erindesign
03-21-2007, 10:33 PM
Can I use 2 where declarations?

Heres an example. Now the && I don't know if it works. How should I go about this? I want to get an artist with the name $artist, that is active yes.


$getfiles = mysql_query("SELECT * FROM `artists` WHERE `name`='$artist' && `active`='y'");

Nightfire
03-21-2007, 10:41 PM
You can use it like that, but I'm not sure if && works, I've always used AND

guelphdad
03-21-2007, 10:41 PM
I believe && and || will work but you should use AND and OR for clarity.

Erindesign
03-21-2007, 10:47 PM
ohhh. duhhhhhh. I knew this. darn it.

Thanks guys ;) rep to both.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum