distal-attribute
distal-attribute
distal-attribute
distal-attribute

Foreign key drop down menu

User, date Message
Written by heraldic2
3 years ago
Category: General
3 posts since Wed, 26 Oct 11
Greetings,

I love HeidiSQL, I was just wondering if there is a way to change the order in a foreign key drop down menu.

An example:
table1 has three columns (id1, first_name, date)
table2 has the columns (id2, id1, info) Foreign Key table1.id1 = table2.id2

When filling in table2 information you use table2.id1 as a drop down. This drop down has 2 columns listed. id1 and first_name. This is done so you know what id1 is, however it is ordered by first_name.

Is there any way to set the order by to id1 instead of first_name, and still see first_name?

Thank you for your time
Written by ansgar
3 years ago
5022 posts since Fri, 07 Apr 06
No, that's some hardcoded part in HeidiSQL which guesses about what the user wants to have displayed in that drop down.
Written by heraldic2
3 years ago
3 posts since Wed, 26 Oct 11
Thank you very much for the reply anse
Written by vr6racer
1 month ago
1 posts since Thu, 07 Aug 14
hi, sorry to revive such an old post, but have the same problem as Heraldic2.

is this still hard coded?
couldn't this be a feature?

Like now, is useful in some tables, but in others gets all messed up.
the best way, was if heidisql permits the user to edit that sql's SELECT and store it for each table.

thank you for your excellent work
Written by ansgar
1 month ago
5022 posts since Fri, 07 Apr 06
What HeidiSQL displays is not really hardcoded. It's the content of the very first varchar or text column in the foreign table. There is no way for the user to change that behaviour currently, unless you move the wanted varchar/text column in the table structure so it's the first one.
 

Please login to leave a reply, or register at first.