Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow editing values of SELECT query Result #1952

Open
Eddcapone opened this issue May 15, 2024 · 9 comments
Open

Allow editing values of SELECT query Result #1952

Eddcapone opened this issue May 15, 2024 · 9 comments

Comments

@Eddcapone
Copy link

It should be possible to edit values of a SELECT query result.
This would save alot of time.

In other software like DBeaver it works.

@ansgarbecker
Copy link
Collaborator

This is already possible. The only requirement is that HeidiSQL is able to determine the table name of the result, and that all columns derive from a single table.

@Eddcapone
Copy link
Author

@ansgarbecker I can't confirm it. It knows the name but I still can't change data:

image

@ansgarbecker
Copy link
Collaborator

Ok, then please select the primary key column(s) as well.

@Eddcapone
Copy link
Author

Eddcapone commented May 16, 2024

Yes, that workaround works. But it would consume less time, if I could just change it without having to figure out the primary key column(s) first and changing my query accordingly. Another problem is, that people need to have that knowledge, otherwise they will think it is a bug / missing feature, like me...

@ansgarbecker
Copy link
Collaborator

You say in DBeaver it works. How does it work there in such a situation? How does an UPDATE look like when you edit a value there?

@Eddcapone
Copy link
Author

Well, I just execute my SELECT e.g.

SELECT path, value FROM
core_config_data 

Then I can simply edit the entries and click on save at the end.

@ansgarbecker
Copy link
Collaborator

My question was how the UPDATE query looks like, after you edited an entry. Can you see that somewhere in the app, perhaps in a log panel?
I can only tell you with these both column names, the UPDATE would break your data, as this Magento table has additional columns in its unique key which are missing here.

@Eddcapone
Copy link
Author

I see. Initially this window popped up:

image

I clicked on Use All Columns. Then after saving it executed these queries:

UPDATE company_2024.core_config_data
    SET value='http://company.vm/xy'
WHERE `path`='web/secure/base_url' AND value='http://company.vm/x'

And then a SELECT afterwards:

SELECT path, value FROM core_config_data WHERE (`path` = 'web/secure/base_url') AND (value = 'http://company.vm/xy')

@ansgarbecker
Copy link
Collaborator

Quite dangerous, this "Use All (selected) columns" button. You probably update more than one row then. Worst case would be you overwrite an important setting with that, and you even don't know you did it.

Is that "Use All columns" really something HeidiSQL should provide?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants