PDA

View Full Version : need help on mysql statement..


uncleroxk
11-17-2008, 06:51 PM
Hi, how do i put this in to a query?

basically 'zxcvb' must match $value0;
and either 'qwerty 'OR 'asdfg ' must match $value1


I have this, don't think it is right..
Select * from table where zxcvb= '$value0' AND qwerty = '$value1 OR asdfg = $value1"

Thank you.

Fumigator
11-17-2008, 07:04 PM
Use parenthesis to clarify your conditions.


WHERE a = '$value0' AND (b = '$value1' OR c = '$value1')

djm0219
11-17-2008, 07:05 PM
"Select * from `table` where `zxcvb`= '$value0' AND (`qwerty` = '$value1' OR `asdfg` = '$value1')"

uncleroxk
11-17-2008, 07:38 PM
Thank you!