1. $search - exact match
2. %$search - contains $search at the end
3. $search% - contains $search at the beginning
4. %$search% - contains $search anywhere
If i look at the code of SearchForm the crucial codes are:
a. $sql = "SELECT id, pagetitle, parent, description FROM $tbl WHERE ($tbl.content LIKE '%".$search."%'";
b. $sql .= " AND $tbl.content like '%$search[$x]%'";
where in my comprehension % is set to case four (%$search%)so that string has to contain $search anywhere.
But if i delete one or both % e.g. to get the exact match i get no results.
Where is the error in my reasoning?
Edited by Christiane, 25 September 2009 - 06:26 PM.