I'm back, trying to figure my way through a somewhat
confusing set of conditons.
Sort of doing a sanity check here.
First explanation:
I've put together a search (the database) form that
has 6 inputs.
Just to clarify, the fields are 
1-JobTitle
2-City
3-Start
4-Industry
5-State
6-TaxTerm.

The idea is that a user can choose one , two or all
fields to put criteria into.  Regardless, whichever
one they choose , there should be a records return. 
More criteria of course adds more refinement.

Right now I only have 4 of the 6 fields rigged for
action- JobTitle, Start, Industry and State.
I half see what's going on, but unclear on how to set
it all up.
So right now, since Title and Start are divided by an
OR, if I chose both, then there is not refinement, I
get records that meet both criteria , not both
criteria combined , savvy ?
Industry is sort of seperate right now, and State can
be combined with industry to refine the results to
match up all industries within whatever particular
states.

I guess ultimately I need a very long series of OR's
and AND's but not sure if there is something neater
and then operator precedence in a series of AND's and
OR's would probably throw me.  At least I think so.

ALright, so I"m sure this is one of my inance babbles
again, but if anyone can decipher my cry for
assistance, feedback, morsels of wisdom and knowledge,
I'm listening.

Stuart
code:

where JobTitle like '%{s_JobTitle}%'
or
PostStart >= DATE_SUB(CurDate(), Interval
({s_PostStart}) day )
$VendorJobs->ds->SQL.= " OR (`VendorJobs`.Industry IN
(".$Projects."))";
$VendorJobs->ds->SQL.= " AND
(`VendorJobs`.LocationState IN (".$Projs."))";

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to