User inputs text (more than 1 word i.e. a phrase) into an input box and hits a submit button.
I want a query that will take the pharse and create a search based on it's main words (I have tried Match() but so far to no avail)
the idea is that a word OR words in the pharse entered can match part of the text in a single DB field.
so far I have a variable $search (for the search text entry)
Code: Select all
<?php
$search = $_POST['search'];
$sqlsearch = "SELECT * FROM (table) WHERE MATCH (field) AGinst $search";
$rs = mysql_query($sqlsearch)
while ($row = mysql_fetch_array($rs, MYSQL_ASSOC))
{
echo $row['Field'];
echo "<br>";
}
?>Please any help out there - I don't mind any other way of doing it BUT it must work, and it must be understandable by me - a complete novice!!!
Any help much appreciated - thanks