Page 2 of 2

Re: I need another set of eyes on this code...

Posted: Fri Sep 23, 2011 2:16 am
by twinedev
If you mean in the WHERE statement...

Requiring both:

Code: Select all

$query = "SELECT foo FROM bar WHERE field LIKE '%{$lname}%' AND field2 LIKE '%{$fname}' ";
Requiring either:

Code: Select all

$query = "SELECT foo FROM bar WHERE field LIKE '%{$lname}%' OR field2 LIKE '%{$fname}' ";
-Greg

Re: I need another set of eyes on this code...

Posted: Sat Sep 24, 2011 7:20 pm
by orbdrums
Once again, you guys are awesome. Thanks for all the help!!