PDA

View Full Version : comparing variable to database


ap0c
11-24-2003, 11:06 PM
Is there a simple way to compare a variable to 2 different database colums and look for a match? One in user(a) and one in post(a).

thanks.

Issvar
11-25-2003, 09:58 AM
SELECT user.*,post.* FROM user LEFT JOIN post on user.id = post.userid WHERE user.a = 1 OR post.a=1

ap0c
11-25-2003, 08:58 PM
will give it a shot, thanks!!!!!