Best Way

From: Date: Sun, 18 Feb 2001 02:56:19 +0000
Subject: Best Way
Groups: php.db 
Request: Send a blank email to php-db+get-6719@lists.php.net to get a copy of this message
I've searched the manual and read many examples, but I have to ask here for the best way to program for a number of possibilities. I've got my site working the hard way, but I'll bet there's a smarter way of doing the following: Visitors to my site can search my database by lastname and/or firstname and/or company. Is there a succinct way to checking for all possible combinations? I alreay have NONE SELECTED covered, but the rest of the possibilities are spotty. Too many IF statements, youknowwhaddimeanverne? SO... the user might just enter the last name, or just the first name, or just the first and last, or just the company or just the last name and the company.. and, oh well, you get the idea. Am I stuck with an awful lot of IF statements or is there a smarter way of handling this? The site is CameraCrews.com. Select "-by Name" to see the input page. Thanks for any help, Don Smith NewsVideo.com

« previous php.db (#6719) next »