This topic is locked

Lookup wizard - Edit Box with Ajax popup

12/13/2011 10:37:54 AM
PHPRunner General questions
G
GunterUK author

Hi,
When using the Lookup wizard and using Ajax popup with Edit box, is there a wild card search instead of taking 1st,2nd,3rd chars from the left (or how many chars you typed in)?

I want to be able to search for any part of string within the results rather than on starting on a strict left to right basis.
The Ajax search option [$suggestAllContent = true] in my include\appsettings.php so I am assuming this has no effect.
Many thanks in advance.

M
mathias@mylo.be 12/26/2011

This can be changed by altering the file lookupsuggest.php in C:\Program Files\PHPRunner5.3\source.

Find the following line:
$LookupSQL .= GetLWDisplayField($f, $strTableName, true)." LIKE '".db_addslashes($value)."%'";
Replace the part '".db_addslashes($value)."%'" by '%".db_addslashes($value)."%'"
So just place the % sign between the single quote and the double quote...
There are two lines where this has to be done.
Save your file, and this will be fixed for all your projects that will be rebuilt using this version of your PHPRunner installation. Keep in mind that your changes will be gone after each PHPRunner minor or major update!
In Version 6:
Replace
db_prepare_string($value."%")
by
db_prepare_string("%".$value."%")