This topic is locked

lookupsuggest.php

7/1/2010 6:39:32 AM
PHPRunner General questions
R
Rigmantas author

Hi,

There phprunner forum I found that:


to show all values based on any symbol open generated ..._lookupsuggest.php file, find this line:
Quote

$LookupSQL .= "`FieldName` LIKE '".db_addslashes($value)."%'";
and replace it with this one:
Quote

$LookupSQL .= "`FieldName` LIKE '%".db_addslashes($value)."%'";



This system has changed in phprunner 5.2

Can anyone help me, is it possible in edit box with AJAX popup to show all values based on any symbol (sometimes need LIKE '%".db_addslashes($value)."%', sometimes - LIKE '".db_addslashes($value)."%' . I know about second "List page with search", but this option require more time for users.

Thanks

Rimantas

R
Rigmantas author 7/1/2010

Ok,

I found decision:

in lookupsuggest.php

change:

first string (about 92 lines)

$LookupSQL .= GetLWDisplayField($f, $strTableName, true)." LIKE '".db_addslashes($value)."%'";


to

if ($field=="your_fieldname_1" or $field=="your_fieldname_next")

{

$LookupSQL .= GetLWDisplayField($f, $strTableName, true)." LIKE '%".db_addslashes($value)."%'";

}
else
{

$LookupSQL .= GetLWDisplayField($f, $strTableName, true)." LIKE '".db_addslashes($value)."%'";

}



Best regards

Rimantas