I'm developing a site that requires people to sign up.  During this time,
we get their name, email, city, etc.  There is also optional informational
like (age, education) that they don't have to fill in.

Now, the problem we have is we allow people search through the database
using mostly the same criteria people filled in during their sign up.
However, if someone does not have a preference in Education or age, how do
we create a query that selects all the records.  Currently, the SQL
statement has several "OR" clauses in between the optional fields 
(ie: select * form clients where (CID='$CID' AND CUserName='$CUserName')
OR CAge='$CAge' OR CEducation='$CEducation').

You can see from the query that if someone has no preference, it will take
the value from the form and search just on that value - NOT everything.

I'm stumped on how to solve this problem.  Can anyone help me out?

Thanks,
Mike


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to