Editing joined resultset

BubikolRamios posted 2 years ago in Feature discussion
Namely this is security risk. But:

table a table b

id f id f
1 foo 1 foo1

select a.id,a.f,b.id.b.f from a join b on a.id = b.id


1 foo 1 foo1

We select foo and try to change it to 'something else'

1.Check if there are multiple rows:
select count(*) from a where id = 1 and f = 'foo' and ...
all fields of a if there are more.

Abort update with some message if that is > 1
(OK TOAD here has no problem,as I think it creates its own temporary index column, but I could live without that (-:)

2. Else Do update

update a set f = 'something else 'where id = 1 and f = 'foo' and ... all fields of a if there are more.

If referenial integrety or uniquesnes set by indexes or ...
would be breaken, step 2 would fail by db error.

All the rest of bad things not accounted before, are db admin responsibility.

Just some thoughts to make anse think of getting this into heidi (-:
crowley666x posted 19 hours ago
SQLyog have this feature and is much interesting.
BubikolRamios posted 12 hours ago
Thanks for inf.
Will play with that a bit ....
BubikolRamios posted 11 hours ago
img for ideas for anse

The join resultset appears default 'read only'.
But jou can select either of tables inside join to edit.
Selecting edit mode does not change display of resultset, it only opens fields from selected table for editing.

That leaves little or no possible no seurity risk for breaking data integrity.

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