Page 1 of 1

Check previous value

Posted: Fri Mar 10, 2023 4:22 pm
by mih
Is it possible to check previous (old) field value in BS and BD event handlers to make some rows in DB table unchangeable?

For now I think about retrieving values from DB and comparing, but maybe on client side (JS) or server (PHP) but without DB query.

Re: Check previous value

Posted: Fri Mar 10, 2023 4:25 pm
by kev1n
When the Before Save and Before Delete event handlers are triggered, nuBuilder does not store the previous field values in memory/in the session. Therefore, to check the previous value of a field, you must retrieve it from the database using a query.

Re: Check previous value

Posted: Fri Mar 10, 2023 4:35 pm
by mih
Thanks. Also I think about some hidden boolean field with "True' values means "PROTECTED" and set it by phpMyAdmin

Re: Check previous value

Posted: Fri Mar 10, 2023 4:57 pm
by kev1n
Is this possible with phpMyAdmin?