Foreign key drop down menu

[expired user #6005]'s profile image [expired user #6005] posted 12 years ago in General Permalink
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
ansgar's profile image ansgar posted 12 years ago Permalink
No, that's some hardcoded part in HeidiSQL which guesses about what the user wants to have displayed in that drop down.
[expired user #6005]'s profile image [expired user #6005] posted 12 years ago Permalink
Thank you very much for the reply anse
[expired user #8257]'s profile image [expired user #8257] posted 10 years ago Permalink
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
ansgar's profile image ansgar posted 10 years ago Permalink
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.