This topic is locked

Default value any for lookup

10/17/2007 5:00:09 AM
PHPRunner General questions
N
nicolagrimshaw author

Hi All
Sorry, another, probably silly question - I just can't work out!
I have a number of dropdown boxes which lookup values from my table which are working fine. I would like to add a default value which would be ANY of the values but as I don't really understand PHP or MySQL I'm not sure how to make a valid statement!
For example on the advanced search page users can currently select continent, country, town-city or hotel but it is not possible just to select, say hotel, without completing all the other fields as it is dependent on the others. Also I will be adding futher fields such as national parks. Not all hotels will have a value for this field so it is important that NULL is also part of the ANY value.
I hope that makes sense????
Thank in advance

Alexey admin 10/17/2007

Hi,
I see what you saying.

ANY option is not avalable now for dependent dropdowns.
You can make Hotels dropdown independent of any other dropdowns.
Add an aliased field (i.e. Hotel1) to your SQL query, set it up as simple Lookup wizard and select to use this field for Advanced searching on the Choose fields tab in PHPRunner.

To add an aliased field proceed to the Edit SQL query tab and modify your query this way:

select

..

Hotel,

Hotel as Hotel1,

...