Hi ho,
I'm trying to conduct a simple text search on a mysql database.
The idea is, someone can enter a key word in a form, hit go and then get the results from the search. Sounds easy eh?
Well, I can tell you, from my perspective it's not so easy.
According to the MySQL manual I should be able to conduct my little search by using the command:
$query="select * from pet where match (petname, petdescription)against ('$interest')";
$result=mysql_query($query)
or die ("Could not execute the mysql query.");
But that simply does not work. When I try running it, all I get is the message "Could not execute the mysql query."
So, can anyone please tell me how to do a simple text search????
Thanks!
(NOTES- my table is called "pet" and the columns I wanted to search are called "petname" and "petdescription". The variable returned by the user from the form is called $interest)
(OTHER NOTES- I've tried both the PHP and the MySQL manual for this one. I am shocked to report that I couldn't find a satisfactory answer.)