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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

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

Post 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
orbdrums
Forum Commoner
Posts: 82
Joined: Wed Sep 14, 2011 11:42 pm

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

Post by orbdrums »

Once again, you guys are awesome. Thanks for all the help!!
Post Reply