The problem is at
http://praetorian.quintopia.net/Members/members2.php. Everything works fine except the search feature never matches any rows, even when it should. (try searching for "Quin" or "Homu" which should match)
I had it display the exact query used and I don't know what's wrong with it. try it out.
The relevant code:
Code:
$searcher = "order by unique_id";
if (isset($search)) {
if (trim($searchterm) == "") {
die("Invalid Search Term. Please go back and try again.");
}
$searchterm = "'%".$searchterm."%'";
$searcher = "where $searchby like $searchterm";
}
if (isset($sort)) {
$searcher = "order by $sortby";
}
$query = "select * from members $searcher";
$result = mysql_query(addslashes($query));
if(!$result) {
if (isset($search)) {
$content = "No matches found. Please go back and try your search again. QUERY: $query";
require('../everypage.php');
exit;
} else {
die("Failed to extract member table from database. Try refreshing this page or come back later<BR>QUERY: $query");
}
}
As I said the displaying of data and the sort feature work fine, its only search queries that won't work. If you could help it would be appreciated.