Hi All,

I am new to this list, and will find it of excellent use to me.

I need help with the following:

What it is I have a cv database and it is working great, I use PHP and MySQL 
and have just come across this problem, the client has asked me to search 
lots of fields in the database. At present we are using the following search 
for searching keywords from 5 fields.

$SQL = " SELECT *, MATCH specific_work_profile,wxcdone, 
wxcdtwo,wxcdthree,wxcdfour AGAINST ('$keywords') AS score FROM cvtemplate 
HAVING score!=0 ORDER BY score DESC";

But the problem is I need the search to do the above as well as searching the 
following: 
'$employment_type' = employment_type
$related_discipline' = related_discipline
'$location' = location

Here is an example of which I thought might work?

$SQL = " SELECT * FROM cvtemplate WHERE employment_type = '$employment_type' 
AND location = '$location' AND related_discipline = '$related_discipline', 
MATCH specific_work_profile, wxcdone, wxcdtwo, wxcdthree, wxcdfour AGAINST 
('$keywords') AS score FROM cvtemplate HAVING score!=0 ORDER BY score DESC";

But I keep getting a sql syntax error. If anyone can help??

Thanks

Barry

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to