WHERE

wxdqz

New Member
I would like to go through a table and pick out three fields in one row only. This is what I'm looking for, something like this:

SELECT id,email,password FROM tlbname WHERE id='$id' AND firstname='$name' OR lastname='$name'

It doesn't work, I don't even know if there is a OR. I would just like to know how that would be accomplished. It only has to match $name in either firstname or lastname, not both.

Thanks, I hope it makes some sense.
 
Back
Top