CodeIgniter Forums
Simple Search in chosen fields - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Simple Search in chosen fields (/showthread.php?tid=49410)



Simple Search in chosen fields - El Forum - 02-18-2012

[eluser]Shiju S S[/eluser]
Modified the table with
Code:
Alter  table listeditems  add
FULLTEXT KEY search (category,subcategory,title,details,address)

The search results was passed to the query:

Code:
$query ="SELECT * FROM listeditems WHERE MATCH (category,subcategory,title,details,address) AGAINST ($searchterm) > 0";

The problem is:

1. Search strings should have a minimum length. This is generally three or four characters, but depends on configuration.

2. If you have fewer than three rows of data, you won’t get any search results back.

How can this problem be solved