I`m trying to find the best method to match records between two tables in a
MySQL database. But it must match atleast once, so here is a scenario for you
to think about.
Member - Job, Salary, Location
Jobs - Job, Salary, Location
All values will be enum sets in both tables as follows
Job = enum 'developer','designer','none'
Salary = enum '10K','15K','none'
Location = enum 'usa','uk','none'
Ok so the user has come to the site and I have his Job Salary and Location
stored, he clicks a link which then performs the search. His values are as
follows..
Job = developer, Salary = 10K, Location = uk
I want to search the Jobs table and match it with the above, this part I can
do. The next stage is if it doesn`t find any matches it then finds the
nearest. So if the only record I have in the Jobs table is as follows
Job = developer, Salary = none, Location = uk
How do I go about making it pick up the nearest.
At the moment I am using
SELECT * FROM Jobs where Job='$Job' and Salary='$Salary' and
Location='$Location'
So obviously it won`t match them, anyone wake me up from my slumber and help
me out with this?
Cheers
Ade
--
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]