This topic is locked

Ajax lookup ind advanced search

7/3/2007 2:59:42 AM
PHPRunner General questions
P
punch author

Hello
i use textfields in one of my advanced search forms.

If i insert the first character, ajax shows some files. But it onlyshows a small range of files, not the whole lookup list.

Can i change this?
Punch

J
Jane 7/3/2007

Punch,
you can do it editing generated ..._searchsuggest.php file manually.

Find this code:

$strSQL = "SELECT DISTINCT ".AddFieldWrappers($searchField)." FROM ".AddTableWrappers($strOriginalTableName)." WHERE ".AddFieldWrappers($searchField).$whereCondition." ORDER BY 1 LIMIT 10";

and replace it with this one:

$strSQL = "SELECT DISTINCT ".AddFieldWrappers($searchField)." FROM ".AddTableWrappers($strOriginalTableName)." WHERE ".AddFieldWrappers($searchField).$whereCondition." ORDER BY 1 LIMIT 25";


Then find this code snippet:

($output = array_chunk(array_unique($response),10))

and replace it with this one:

($output = array_chunk(array_unique($response),25))