Hi, I have searched and searched for the answer to this little problem but haven't really found anything. I need to select information from a table where member_id equals a sepcific number. That part's no problem, works like a charm. HOwever, when I add AND url != '' I keep getting a cyntax error. I have tried IS NOT NULL, NOT NULL, and none of it works. I have searched Google quite a bit but haven't found the proper way to do it. Thanks for any help. Just for the sake of completeness, here's my code: $sql = "SELECT member_id FROM members WHERE ref1 = " . $_SESSION["ref1"] . " AND url != ''"; BlueScale