| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
I can't seem to work this out. Spent about 30 minutes digging through the net.
Why doesn't this work:
"SELECT client_id,fname,lname FROM clients WHERE fname OR lname = '$search_val'";
Welcome [webmasterworld.com] to WebmasterWorld!
Because there is no conditional on fname.
I believe this is what you mean:
WHERE fname = '$search_val' OR lname = '$search_val'
Hi there Discord,
Welcome to the forum :)
Good news is you are almost there, try this:-
"SELECT `client_id`, `fname`, `lname` FROM `clients` WHERE `fname` = '".$search_val."' OR `lname` = '".$search_val."' ";
That should be ok, you see the logic there hopefully,
[EDIT:] Great minds think alike ;)
[edited by: Matthew1980 at 8:55 pm (utc) on Jun 25, 2010]
a-ha! so simple.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved