custom select fields

Hi,

I have a application that need to list users from AD after a specific search filter is given. I want the result been shown in a select field, but do not know how to populate the field from code. The only idea i could come up with is to dump the search result into a table and link the select field to that table, but this is overkill, slow and some kind of stupid.
I’ve tried something like {my filedname} = $myarray but this won’t work.

Any ideas on how to do this?

Thanks,

Tim

If i understood your question correctly, i think you simply can use where clause in the select field sql statement like this.

select someField
from sometable
where field1 = ‘[thisFilterVariable1]’

Hope it helps.

[QUOTE=ishwor;11516]If i understood your question correctly, i think you simply can use where clause in the select field sql statement like this.

select someField
from sometable
where field1 = ‘[thisFilterVariable1]’

Hope it helps.[/QUOTE]

Hi ishwor,

Thank you for answering my question, but it’s not what I’m looking for. I have a piece of code written to query active directory users and want to populate them into a select field from my php code, so no SQL is used here.

Grtz,

Tim

Perhaps you can store the list of active directory users in a temp file and then create a select field in form with reference to this table… ??
Hote it helps.

The select field is depending on two possibilities: on a table (automatic) and by hand (manual). I haven’t found a way of filling the select from php, so I fear that you have to use a temporary table. I agree that it’s a kind of workaround, but it works. I don’t know which db you are using, but speed was never an issue for me. I mean, these things go so fast, the total execution time is not measurable increased (and I have big tables)