[plug] mysql question
Aaron Devenny
aaron at nw.com.au
Fri Sep 24 17:39:05 WST 2004
You may need to add %'s around your search syntax. Ie.
SELECT * FROM jobads WHERE
(MATCH(jobtitle,location,paytype,shortdescription,advertisement,contactdetai
ls)
AGAINST ('%search text%')
The % means anything, so therefore anything before or after, as long as it
contains 'searchtext'.
I haven't tested it, but the LIKE statement syntax has the %'s in it.
Regards
Aaron
-----Original Message-----
From: plug-bounces at plug.linux.org.au [mailto:plug-bounces at plug.linux.org.au]
On Behalf Of Shayne O'Neill
Sent: Friday, September 24, 2004 5:27 PM
To: plug at plug.linux.org.au
Subject: [plug] mysql question
I have a database of job descriptions.
Assuming I have a full text index (according to phpmyadmin) against all
the correct fields, is there anything wrong with;-
SELECT * FROM jobads WHERE
(MATCH(jobtitle,location,paytype,shortdescription,advertisement,contactdetai
ls)
AGAINST ('[search text]')
as a basic search string. it doesnt crash out or anything, but always
comes up empty even when I *know* the search text is in there somewhere.
any gotchyas I need to be lookin out for?
--
"Well, I think if you say you're going to do something and don't do
it, that's trustworthiness."
-- George Bush on CNN online chat, Aug.30, 2000
RIAA Copyright notice trap: http://guild.murdoch.edu.au/~shayne/
_______________________________________________
PLUG discussion list: plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug
Committee e-mail: committee at plug.linux.org.au
More information about the plug
mailing list