Topic: datatable editor - save changes in sql database

DanielKYantis priority asked 2 years ago

How do I save this to my sql database once it is edited?It lets me edit but then what?I am obviously new to this. Thank you for your help.

`<div   class="table-editor"   id="table_1"   data-mdb-entries="5"   data-mdb-entries-options="[5, 10, 15]"
>   <table class="table">
        <th class="th-sm">username</th>
        <th class="th-sm">fname</th>
                <th class="th-sm">lname</th>
                <th class="th-sm">email</th>
                <th class="th-sm">cellPhone</th>

            <?php>          $db->query("SELECT * FROM users");             foreach ($db->results() as $record) {
                        <td>" . $record->username              . "</td>
                        <td>" . $record->fname                     . "</td>
                        <td>" . $record->lname                     . "</td>
                        <td>" . $record->email                     . "</td>
                        <td>" . $record->cellPhone             . "</td>
                ;           };          ?>

    </tbody>   </table> </div>`

Grzegorz Bujański staff answered 2 years ago

You can catch update.mdb.tableEditor event. This event returns updated data. You can find more about events here

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.11.0
  • Device: any
  • Browser: chrome
  • OS: any
  • Provided sample code: No
  • Provided link: No