I want to do an update on a Firebird table. So far not a problem:
update MYTABLE
set params = replace(params, 'SOMEHOST', 'SOMENEWHOST')
Before the update statement my params look like this:
s:91:"{"server":"SOMEHOST","port":"21","ssl":false,"user":"DUMMY","pwd":"SECRET","path":"FOLDER"}";
After my update the params look like this:
s:91:"{"server":"SOMENEWHOST","port":"21","ssl":false,"user":"DUMMY","pwd":"SECRET","path":"FOLDER"}";
So far it's ok.
But the frontend program can not handle this because there is a checksum in the params.
The value s:91 is the character length from the opening brace to the closing one.
From row to row the character length can differ because there is another path, user or pwd.
Is it possible to calculate the character length from the opening brace to the closing and extend the update statement with Firebird?