Hi,
I need help with searching a MySQL database with PHP.
I have tried 2 methods to search various tables in the database:
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
-----
$guideline_query = "SELECT * FROM guidelines WHERE question LIKE '%$search%' OR text LIKE '%$search%' ";
$query_result = mysql_query($guideline_que
ry) or die(mysql_error());
$calendar_query = "SELECT * from calendar_entries WHERE MATCH(entry_title, entry_description, entry_location) AGAINST('$search')";
$calendar_result = mysql_query($calendar_quer
y)
or die(mysql_error());
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
-----
The problem is it doesn't always seem to search properly, sometimes it matches text from the tables with the search word yet the majority of the time it does not.
The version of PHP that is running on the server is:
PHP Version 4.1.2
Thanks
Start Free Trial