eleanor
7th November 2007, 14:03
Hi, I've created an application that's based on mysql table.
Mysql table has FOREIGN KEYs set from first tables's field (town) to second table's field (also town)
What I want to do now is to add a QComboBox (that points to the first table's field town, but when I click drop-down button I want to display the values that are stored in second table's field (town) and write that town to the first table's field.
The problem is that I want to automatically detect that mysql table's field have relations set (with FOREIGH KEY) so that dropdown menu can display itself properly.
Any ideas how to do that?
Mysql table has FOREIGN KEYs set from first tables's field (town) to second table's field (also town)
What I want to do now is to add a QComboBox (that points to the first table's field town, but when I click drop-down button I want to display the values that are stored in second table's field (town) and write that town to the first table's field.
The problem is that I want to automatically detect that mysql table's field have relations set (with FOREIGH KEY) so that dropdown menu can display itself properly.
Any ideas how to do that?