This topic is locked

update table with new button

4/23/2024 6:20:37 AM
PHPRunner General questions
R
rkn2003 author

hi,

what should i do when i want update table with "new button", but not doing anything with (getCurrentRecord() or getNextSelectedRecord()).
just simple click button then update value in table .
just query , example :
UPDATE detail SET price = 10000;

C
cristi 4/23/2024

In order to update you need a parameter for the "where" part and you get this with getCurrentRecord() or getNextSelectedRecord().
If you just want to update without condition you can do that (like a bulk update) but it would perform horribly as it would go through every row in the table and every price will be set to 10000!
So you could take a custom button and use just the server part with the query you said.