EarthDay Posted June 27, 2023 Share Posted June 27, 2023 Hi there, I was wondering if someone could point me in the right direction please? I am trying to alter my CRUD view table by adding a check box to the row and using a drop down menu to update a field in the database for multiple records. Say that a client has a status of referral and I want to change multiple clients to In Progress, I want to be able to select the clients and use the drop down menu to update the status. Any help would greatly be appreciated. Thanks, ED. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted June 27, 2023 Share Posted June 27, 2023 you would use an array name for the checkbox field, with the record id used for either the array index or the checkbox value. only checked checkboxes will be set in the submitted form data, so you can detect if any are set (the field name will be set), and get all the checked record ids. you would then use the submitted status value to update the records with those ids. you can use a single FIND_IN_SET() statement in the WHERE clause to do this using one single database query. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.