This topic is locked

Lookup Wizard optimization

10/20/2006 4:46:48 AM
PHPRunner General questions
J
jgestiot author

When using the list of values (rather than lookup table) in the Lookup Wizard, it looks like PHPRunner 3.1 is storing the full strings in the table.
I tested it by creating a VARCHAR field in the destination table and I set up Apples, Oranges and Lemons as values in the list.
If I multi-select all three, it places "Apples,Oranges,Lemons" in the destination. There is no check to verify that the string fits and it is truncated if the length is insufficient.
Doesn't it make sense for the wizard to allow an index to be associated with each item in the list of values and save that index into the database rather than the descriptive string?

J
Jane 10/20/2006

Hi,
to save only indexes of the values use Lookup table option for the Lookup wizard on the "Edit as" settings dialog.

For example, create new table with values and indexes of values and then use this table as Lookup table.

T
thesofa 10/20/2006

I think i got around this by having a list like this

1 Apples

2 Oranges

3 Pears
then the table shows as above in the drop list

if you have the field that stores the selection as an integer, it only stores the integer part of the list entry

whether this will work with multiple entries or not, i have not tested.

HTH

J
jgestiot author 10/20/2006

Hi,

to save only indexes of the values use Lookup table option for the Lookup wizard on the "Edit as" settings dialog.

For example, create new table with values and indexes of values and then use this table as Lookup table.


This is not going to allow me to save multiple values to the same field since lookup table does not allow multiline. I need exactly what the list of values+multiline do in the Lookup Wizard but instead of saving the whole string to the table, I would need only the associated indexing values to be added (it would save a lot of room).
As a workaround, is there support for the ENUM type in PHPRunner 3.1?

J
Jane 10/20/2006

There is no special support of ENUM types in the PHPRunner. ENUM field are treated as VARCHAR.
I recommend to increase your VARCHAR field and you use List of values option.

J
jgestiot author 10/20/2006

I think i got around this by having a list like this

1 Apples

2 Oranges

3 Pears
then the table shows as above in the drop list

if you have the field that stores the selection as an integer, it only stores the integer part of the list entry

whether this will work with multiple entries or not, i have not tested.

HTH


I can see how a string like "1 Apples" would leave a 1 in an int field. However, I need to have:
1 Apples

2 Oranges

3 Pears
and have 1,2,3 stored in a varchar field. PHPMaker 4.1 which I am also evaluating at the moment has the feature. Unfortunately, I think PhPRunner is vastly superior overall, especially for advanced PHP developers.
I would suggest to the people who maintain PHPRunner to take a look at the way this feature is implemented in PHPMaker and put it in the next version. My next move is to find a way to hack the code to make it work.

T
thesofa 10/20/2006

if you set the list like thi

1 apples

2 pears

4 plums

8 banas
you could add the integers and store that value, this would allow bitwise searching later to find what is in the field?

J
jgestiot author 10/24/2006

if you set the list like thi

1 apples

2 pears

4 plums

8 banas
you could add the intergers and store that value, this would llow bitwise searching later to find what is in the field?


This is why I asked if they supported the enum type. I'm hoping this whole question is going to be solved in a later release either by adding a column in the Lookup Wizard values or by supporting the ENUM type. Thanks for your help.