List:General Discussion« Previous MessageNext Message »
From:healthserv Date:February 15 2005 3:20am
Subject:How to do a simple fulltext match? Thanks!
View as plain text  

I am having a problem searching a fulltext field.  I'm setting up a little code library
program for a few of us who work together.  One field (TEXT) is "keywords" and it is
indexed as well as fulltext.  I send a simple query via my form to the code below.  The
connection is successfully made, and  I attempt to match my little search (for the word
"short") contained in the variable $searchterms.  However, I get back the message that
$peeky (below) is not a valid MySql resource.  Can someone tell me what I am doing wrong? 
 Thanks so much!



======= Errant Code follows ===========

$dbh=mysql_connect ("localhost", "something_here", "something_here") or die ('Connection
failed because: ' . mysql_error());
mysql_select_db ("thedatabase");

 $peeky=MYSQL_QUERY("select MATCH(keywords) AGAINST \"$searchterms\"  from CodeLib" );

echo "<br>Howmany=$howMany" ;

How to do a simple fulltext match? Thanks!healthserv15 Feb
  • Re: How to do a simple fulltext match? Thanks!Michael Stassen16 Feb