Good day. I would like to know how to organize the connection between the tables using the DBGrid component to display from the database.
For example, there are tables "Товар" , structure:
- [id] key field (auto increment, counter)
- [nazvanie] product name
- [id_ed_izm] here is the ID from the unit table
And the table "Units of measurement" `, structure:
- [id] key field (auto increment, counter)
- [nazvanie] title
And there is such an entry in the table "Товар" :
|1|Ручка|1| And also "Единицы измерения" :
|1|Шт.| Well, in a toga, if you take the records out of the goods, you get (1 handle 1), but I would like to see (1 pen of a piece), i.e. so that instead of 1, the name from another table is automatically displayed.
The example is simple, but will help for more complex tasks.