Skip to main content
Topic: lookup field (Read 1420 times) previous topic - next topic

lookup field

Suppose you have a data table 'customers'. Those customers have a property: nationality . To have users make similar choices, we can use a select with certain values as index and a description as text. I want to store an integer only, so not the text, in the customer table field nationality. I create another table: nationalities. There i store an ID and a descrpition. In the add and edit customer pages, i want the select filled with the index/value from the table nationality. In the other customer pages i want to see only the text, not the index.

EG both 'php generator for mysql'  and 'Code Charge Studio' have a standard field option called 'Lookup field'.

How can we do this in PHP Rad?